Skip to content

Instantly share code, notes, and snippets.

View dermesser's full-sized avatar
🐢
a bit of time :-)

Lewin Bormann dermesser

🐢
a bit of time :-)
View GitHub Profile
extern crate tokio_core;
extern crate futures;
use std::io;
use std::net::{self, SocketAddr, ToSocketAddrs};
use tokio_core::net::{RecvDgram, UdpSocket};
use futures::Future;
fn handle_dgram
@dermesser
dermesser / trees.rkt
Last active February 28, 2017 18:24
finger exercises with binary trees in scheme.
#lang racket/base
(require racket/list)
(struct node (val left right) #:transparent)
(define (tree-new val) (node val null null))
(define (tree-insert t val)
(cond [(null? t) (tree-new val)]
[(null? (node-val t)) (tree-new val)]
@dermesser
dermesser / coverage.sh
Last active August 12, 2017 08:08
generate coverage reports for Rust crates. This needs kcov installed.
#!/bin/bash
KCOV=kcov
KCOV_OPTS="--verify --exclude-pattern=/.cargo"
KCOV_OUT="./kcov-out/"
export RUSTFLAGS="-C link-dead-code"
TEST_BIN=$(cargo test --no-run 2>&1 >/dev/null | awk '/^ Running target\/debug\// { print $2 }')
// Experimentalphysik I 2018/19: Schiefer Wurf.
// Gruppe 7
//
// (c) 2018 Lewin Bormann
package main
import (
"flag"
"fmt"
"math"
extern crate getopts;
use getopts::Options;
#[derive(Clone, Debug)]
struct State {
t: f64,
h: f64,
x: f64,
v_vert: f64,
#include <iostream>
#include <string>
#include <vector>
#include <climits>
struct inner {
std::string bezeichnung_;
int value_;
};
#include <iostream>
#include <string>
#include <vector>
#include <climits>
struct inner {
std::string bezeichnung_;
int value_;
};
#include <iostream>
#include <cstdlib>
struct A {
int i;
A(int i) : i(i) {}
~A() { std::cout << i - 1; }
void print() { std::cout << i; }
};
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Apr 1 12:31:31 2019
@author: lbo
"""
import numpy
import random
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Apr 25 22:40:53 2019
@author: Lewin Bormann, Emily Leung, Kira Jürgens
"""
import matplotlib.pyplot as plt
import numpy.random as rd