Skip to content

Instantly share code, notes, and snippets.

View lindenb's full-sized avatar
😶
I hate people.

Pierre Lindenbaum lindenb

😶
I hate people.
View GitHub Profile
import gov.nih.nlm.ncbi.snp.geno.Individual;
import gov.nih.nlm.ncbi.snp.geno.SnpInfo;
import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.zip.GZIPInputStream;
import javax.xml.bind.JAXBContext;
/*
gcc -m64 -I package/sam/samtools-0.1.7a -L package/sam/samtools-0.1.7a jeter.c -lbam -lz
*/
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#include "bam.h"
#include "sam.h"
int main(int argc, char *argv[]) {
@lindenb
lindenb / BioStar4296.java
Created December 14, 2010 14:29
Given a gene, identify the world experts http://biostar.stackexchange.com/questions/4296
/**
* Author: Pierre Lindenbaum PhD
* WWW: http://plindenbaum.blogspot.com
* Motivation:
* Given a gene, identify the world experts
* http://biostar.stackexchange.com/questions/4296
*/
import java.net.URLEncoder;
import java.text.Collator;
import java.util.ArrayList;
@lindenb
lindenb / Delicious2Diigo.java
Created December 19, 2010 14:48
Save bookmarks from delicious to Diigo.com using the Diigo API.
/**
* Delicious2Diigo
*
* Author:
* Pierre Lindenbaum
* http://plindenbaum.blogspot.com
*
* Motivation:
* save bookmarks from delicious to diigo using the Diigo API.
*
@lindenb
lindenb / translate.js
Created December 31, 2010 12:46
My first Node.js script . translate a DNA to a protein
/**
* Author:
* Pierre Lindenbaum
* Mail:
* [email protected]
* WWW:
* http://plindenbaum.blogspot.com
* Motivation:
* my first Node.js script . translate a DNA to a protein
* Usage:
@lindenb
lindenb / translate.c
Created December 31, 2010 14:09
translate a DNA to a protein using Node.js and an external C program
#include <stdio.h>
#include <ctype.h>
static const char* STD_GENETIC_CODE="FFLLSSSSYY**CC*WLLLLPPPPHHQQRRRRIIIMTTTTNNKKSSRRVVVVAAAADDEEGGGG";
static int base2index(int c)
{
switch(c)
{
case 'T':case 't': return 0;
case 'C':case 'c': return 1;
@lindenb
lindenb / Makefile
Created January 5, 2011 00:33
My first CXF service
cxf.lib=apache-cxf-2.3.1/lib
all:
mkdir -p translate/WEB-INF/lib
javac -d translate/WEB-INF/classes -sourcepath translate/WEB-INF/classes translate/WEB-INF/classes/bio/TranslateImpl.java
cp ${cxf.lib}/cxf-2.3.1.jar \
${cxf.lib}/geronimo-activation_1.1_spec-1.1.jar \
${cxf.lib}/geronimo-annotation_1.0_spec-1.1.1.jar \
${cxf.lib}/geronimo-javamail_1.4_spec-1.7.1.jar \
${cxf.lib}/geronimo-servlet_3.0_spec-1.0.jar \
${cxf.lib}/geronimo-ws-metadata_2.0_spec-1.1.3.jar \
<?xml version='1.0' encoding="ISO-8859-1"?>
<xsl:stylesheet
xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
version='1.0'
>
<xsl:param name="layout">ref</xsl:param>
<!--
Author:
/**
http://stackoverflow.com/questions/4684930
javac Test.java
java Test
*/
import javax.xml.parsers.*;
public class Test
{
public static void main(String args[])
@lindenb
lindenb / TestOAuth.java
Created January 28, 2011 21:35
Simple test for OAUth with the Scribe library
/**
* Pierre Lindenbaum
* Simple test for OAUth with the Scribe library
*/
import javax.swing.JOptionPane;
import org.scribe.builder.ServiceBuilder;
import org.scribe.builder.api.TwitterApi;
import org.scribe.model.OAuthRequest;