Skip to content

Instantly share code, notes, and snippets.

View virup's full-sized avatar

Viru Kanjilal virup

  • Standard Metrics
  • United States
View GitHub Profile
@virup
virup / dog_tag.c
Created October 1, 2012 18:33
Implementation of dog-tags to detect memory corruption
#include <stdlib.h>
#include <stdio.h>
#define INUSE 1
#define FREED 0
void *safe_malloc(unsigned int length)
{
int *tag;
char *actualStartPt;
@virup
virup / citation_count.py
Created September 17, 2012 20:32 — forked from cegme/citation_count.py
Counting important scores for papers in and citations
#!/usr/bin/python
#changed a bit
import itertools
from collections import defaultdict
# k is cited by v
ref_backwards = [(1,2),
(2,3),
(3,2),
(4,1),