Skip to content

Instantly share code, notes, and snippets.

View renaud's full-sized avatar

Renaud Richardet renaud

View GitHub Profile
@renaud
renaud / Biostar45366.java
Last active December 20, 2015 01:49 — forked from lindenb/Biostar45366.java
OBO parser
package ch.epfl.bbp.nlp.obo;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
package topic
import spark.broadcast._
import spark.SparkContext
import spark.SparkContext._
import spark.RDD
import spark.storage.StorageLevel
import scala.util.Random
import scala.math.{ sqrt, log, pow, abs, exp, min, max }
import scala.collection.mutable.HashMap
// Modifies $httpProvider for correct server communication (POST variable format)
angular.module('http-post-fix', [], function($httpProvider) {
// This code is taken from http://victorblog.com/2012/12/20/make-angularjs-http-service-behave-like-jquery-ajax/
// Use x-www-form-urlencoded Content-Type
$httpProvider.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=utf-8';
// Override $http service's default transformRequest
$httpProvider.defaults.transformRequest = [function(data) {
/**
@renaud
renaud / imdbsample
Created November 22, 2024 10:35 — forked from jensdittrich/imdbsample
sample of IMDb
group: IMDB-sample
actors = {
id:number first_name:string last_name:string gender:string
10963 "Chris" "Anastasio" "M"
32638 "Michael" "Beach" "M"
33949 "John" "Bedford Lloyd" "M"
42278 "Michael" "Biehn" "M"
57051 "Captain Kidd" "Brewer Jr." "M"
64610 "Leo" "Burmester" "M"