Skip to content

Instantly share code, notes, and snippets.

View nilsdeppe's full-sized avatar
🤓

Nils Deppe nilsdeppe

🤓
View GitHub Profile
@nilsdeppe
nilsdeppe / emacs.el
Last active June 7, 2020 16:31
My Emacs init file
;;; initfile --- Summary:
;;; Commentary:
;; Emacs 25.1 and newer tested
;;; Code:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Configuration/Customization:
;; Defines global variables that are later used to customize and set
;; up packages.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@nilsdeppe
nilsdeppe / ycm_extra_conf.py
Last active January 3, 2019 18:11
A Python script used by https://github.com/Valloric/ycmd to provide code completion in header files.
#!/bin/env python
# Copyright Nils Deppe, 2017
# Distributed under the Boost Software License - Version 1.0
# Boost Software License - Version 1.0 - August 17th, 2003
# Permission is hereby granted, free of charge, to any person or organization
# obtaining a copy of the software and accompanying documentation covered by
# this license (the "Software") to use, reproduce, display, distribute,
@nilsdeppe
nilsdeppe / boost_ode.cpp
Created October 2, 2020 22:55
An example of how to use Boost.odeint to integrate a simple ODE.
#include <array> // for std::array
#include <boost/numeric/odeint.hpp> // for all boost ODE int
#include <functional> // for std::ref
#include <iostream> // for std::cout
#include <vector> // for std::vector
static constexpr size_t number_of_dependent_variables = 1;
// The Observer is a class that stores the state of the ODE integration so we
// can get not just the end result of the integration, but a solution over time.