Skip to content

Instantly share code, notes, and snippets.

@mina86
mina86 / fib.c
Created January 16, 2010 22:21 — forked from rsayers/fib.c
#include <stdio.h>
static unsigned long count;
static unsigned long fib(unsigned n) {
++count;
return n > 1 ? fib(n - 1) + fib(n - 2) : n;
}
int main(void) {
unsigned i;
@mina86
mina86 / version.py
Last active December 10, 2022 04:07 — forked from dcreager/version.py
Extract a setuptools version from the git repository's tags.
# -*- coding: utf-8 -*-
"""Calculates the current version number.
If possible, uses output of “git describe” modified to conform to the
visioning scheme that setuptools uses (see PEP 386). Releases must be
labelled with annotated tags (signed tags are annotated) of the following
format:
v<num>(.<num>)+ [ {a|b|c|rc} <num> (.<num>)* ]