Skip to content

Instantly share code, notes, and snippets.

View joelthelion's full-sized avatar

Joel Schaerer joelthelion

  • Bioclinica
  • Lyon, France
View GitHub Profile
@joelthelion
joelthelion / buzz.py
Created October 27, 2009 10:08
This is a simple script to identify the newest trends on a set of RSS feeds. It requires Mark Pilgrim's feedparser.
#!/usr/bin/env python
# coding=utf8
#Identify the newest trends
from __future__ import division
import os
import re
import cPickle
import time
import sys
@joelthelion
joelthelion / gist:102413
Created April 27, 2009 09:35
Parse a string in C++
template<class ElementType>
std::vector<ElementType> parse_string(std::string str,char delim)
{
std::istringstream ss(str);
std::string token;
std::vector<ElementType> result;
while (getline(ss,token,delim))
{
std::istringstream token_parser(token);
ElementType value;