This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
# -*- coding: utf-8 -*- | |
# Copyright © 2016 Martin Ueding <mu@martin-ueding.de> | |
import argparse | |
import random | |
import time | |
import matplotlib.pyplot as pl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
# Copyright © 2019 Martin Ueding <dev@martin-ueding.de> | |
# Licensed under the MIT/Expat license. | |
# Based on https://bugs.kde.org/show_bug.cgi?id=356225#c312 | |
import argparse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#' Apply and Merge | |
#' | |
#' Applies the given function to each row of the data frame. The function is | |
#' expected to return a data frame itself. The resulting data frames are bound | |
#' together and joined with the previous data frame. | |
apply_merge <- function (df, f, cols) { | |
# We first need to label the rows in the given data frame. We use a column | |
# name with period as this is an implementation detail. | |
df$.id <- 1:nrow(df) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright © 2017 Martin Ueding <dev@martin-ueding.de> | |
// Implementation of the “Game of Life”. | |
// | |
// This uses a linearized 2D array with an index function (`idx`). | |
#include <stdio.h> | |
#include <stdlib.h> | |
// For `memset`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright © 2017 Martin Ueding <dev@martin-ueding.de> | |
// Licensed under the MIT license | |
// Compiled with: | |
// | |
// gcc -Wall -Wpedantic -fopenmp strcpy.c -o strcpy -O3 -g | |
/* | |
String length: 1,000,000,000 | |
short_strcpy: 0.961368 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "mymath.h" | |
#include <stdio.h> | |
int main(){ | |
double t=5; | |
double *p; | |
double m; | |
p=&t; | |
m=square_to(p); | |
printf("%f\n%f\n", t, m); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Copyright © 2016 Martin Ueding <dev@martin-ueding.de> | |
set -e | |
set -u | |
set -x | |
width=2480 | |
half_height=$(( 3508 / 2 )) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
# -*- coding: utf-8 -*- | |
# Copyright © 2015 Martin Ueding <dev@martin-ueding.de> | |
# Licensed under The MIT License | |
''' | |
Installs documentation packages for all installed TeXLive packages on Fedora | |
22. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright © 2015 Martin Ueding <dev@martin-ueding.de> | |
// Try to leak as many file descriptors until the program crashes. | |
#include <stdio.h> | |
#include <stdlib.h> | |
int main(int argc, char **argv) { | |
char filename[100]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mu@fedora-22-beta:~ SSH 17.8s su 2015-05-25 17:06:46 | |
Passwort: | |
[root@fedora-22-beta mu]# dnf install rubygem-rails | |
Last metadata expiration check performed 0:00:00 ago on Mon May 25 17:07:37 2015. | |
Abhängigkeiten sind aufgelöst. | |
=============================================================================================================================================================================================================================================== | |
Paket Arch Version Paketquelle Größe | |
================================================================================================================================= |