Skip to content

Instantly share code, notes, and snippets.

Avatar
💻
Hacking away

Samuel Lampa samuell

💻
Hacking away
View GitHub Profile
@lindenb
lindenb / README.md
Created Mar 21, 2018
parsing drugbang XML->TSV using XSLT . keywords java xslt jvarkit xsltstream drugbank
View README.md
@lindenb
lindenb / Drugbank.java
Created Mar 21, 2018
Parsing drugbank using a xml schema and java keywords: drugbank xjc xsd schema xml java javac
View Drugbank.java
/*
Author: Pierre Lindenbaum @yokofakun
related:
http://bionics.it/posts/parsing-drugbank-xml-or-any-large-xml-file-in-streaming-mode-in-go
*/
import ca.drugbank.*;
import java.util.*;
import java.util.stream.*;
View dump_nodes_from_drupal6.sql
SELECT node.title,timestamp,node_revisions.body
FROM node
LEFT JOIN node_revisions ON node.vid=node_revisions.vid
INTO OUTFILE '/tmp/nodes.csv'
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n';
@sgsfak
sgsfak / Drugbank parse to DB
Last active Dec 23, 2018
Parse DrugBank XML file with xmlstarlet
We couldn’t find that file to show.
View gc_count.exs
defmodule ATGCCount do
def count(sequence), do: cnt(String.to_char_list(sequence),0,0)
def cnt([65|t],at,gc), do: cnt(t,at+1,gc)
def cnt([84|t],at,gc), do: cnt(t,at+1,gc)
def cnt([71|t],at,gc), do: cnt(t,at,gc+1)
def cnt([67|t],at,gc), do: cnt(t,at,gc+1)
def cnt([62|_],at,gc), do: {at,gc}
def cnt([],at,gc), do: {at,gc}
# def cnt(_,0,0), do: {0,0}
def cnt([_|t], at, gc), do: cnt(t,at,gc)
View roles_elixir_tasks_main.yml
---
- name: Create directory to put elixir in
sudo: 'yes'
shell: "mkdir -p /opt/elixir/v0.15.0"
- name: Install unzip
apt: name=unzip state=present update_cache=true
- name: Unzip elixir release
sudo: 'yes'
View gc_count.jl
#!/usr/bin/env julia
function gc_count(fasta::String)
file = open(fasta, "r")
lines = readall(file)
gc = at = 0
for c in lines.data
if (c == 'G') || (c == 'C')
gc += 1
View gc_fsm.rs
use std::io::fs::File;
enum ReadState {
Normal,
Newline,
Skipline,
}
fn main() {
let mut at = 0i;
@debasishg
debasishg / gist:8172796
Last active Oct 26, 2020
A collection of links for streaming algorithms and data structures
View gist:8172796
  1. General Background and Overview
View README.md

Vagrant Setup

This tutorial guides you through creating your first Vagrant project.

We start with a generic Ubuntu VM, and use the Chef provisioning tool to:

  • install packages for vim, git
  • create user accounts, as specified in included JSON config files
  • install specified user dotfiles (.bashrc, .vimrc, etc) from a git repository

Afterwards, we'll see how easy it is to package our newly provisioned VM

You can’t perform that action at this time.