Skip to content

Instantly share code, notes, and snippets.

@thomasvn
thomasvn / led-experiment.c
Created December 22, 2016 00:32
A minimal contiki program to play around with LEDs based on buttons pressed
#include "contiki.h"
#include "sys/etimer.h"
#include "dev/leds.h"
#include "dev/watchdog.h"
#include "button-sensor.h"
#include "rf-core/rf-ble.h"
#include <stdio.h>
/*---------------------------------------------------------------------------*/
#define CC26XX_DEMO_LOOP_INTERVAL (CLOCK_SECOND * 20)
@thomasvn
thomasvn / radix.py
Last active March 18, 2021 19:26
Radix Sort Implementation in Python
#!/usr/bin/python
import time
# Function that takes a list and sorts using radix sort implementation
def radixsort(toBeSorted):
digit = 1
atTheEnd = False
r = 10 # The base of the numbers we choose to sort
@thomasvn
thomasvn / radix.c
Last active November 10, 2020 19:06
Radix Sort Implementation using C
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <time.h>
#include <math.h>
#define r 10
// ----------------------------------------------------------------------
// ------------------------- DEQUE CLASS --------------------------------
// ----------------------------------------------------------------------