Skip to content

Instantly share code, notes, and snippets.

View maxulysse's full-sized avatar

Maxime U Garcia maxulysse

View GitHub Profile
@stephenturner
stephenturner / ismb_twitter.R
Created July 17, 2012 22:35
Plot twitter hashtag usage over time and 40 most prolific authors
library(twitteR)
library(ggplot2)
tweets <- list()
dates <- paste("2012-07-",11:18,sep="") # need to go to 18th to catch tweets from 17th
for (i in 2:length(dates)) {
print(paste(dates[i-1], dates[i]))
tweets <- c(tweets, searchTwitter("#ISMB", since=dates[i-1], until=dates[i], n=1500))
}
@lindenb
lindenb / tabix.js
Created May 29, 2013 13:54
javascript bindings for tabix.
/**
JAVASCRIPT BINDINGS for Tabix.
Author: Pierre Lindenbaum PhD @yokofakun http://plindenbaum.blogspot.com
Date: 2013
*/
/* import js-ctypes */
Components.utils.import("resource://gre/modules/ctypes.jsm")
@royludo
royludo / random_input_gen.py
Last active January 24, 2017 12:31
Input generator for the 1st problem of the Bioinfo Contest 2017, to be used for testing solutions. Write a lot of chemical reactions in the appropriate format. Useful parameters and file generated are indicated with comments.
import random
total = random.randrange(200,400) # all chemicals will be in the range 1:total
init_count = random.randrange(40,80) # length of the 1st line
reaction_count = random.randrange(200,2000) # number of line of the input
l = []
for i in range(0, init_count):
l.append(str(random.randrange(1, total)))
string = " ".join(l) + "\n"
@Kumquatum
Kumquatum / tree.sh
Last active March 29, 2019 12:49
tree without install
shopt -s globstar
for file in **/*
do
slash=${file//[^\/]}
case "${#slash}" in
0) echo "├── ${file}";;
1) echo "│ ├── ${file}";;
2) echo "│ │ ├── ${file}";;
esac
done
@Lucas-C
Lucas-C / build_stats_page.py
Last active October 8, 2019 16:42
Generate an HTML page with graphs representing the evolution of issues & PRs for a given GitHub repo
#!/usr/bin/env python3
# Inspired by https://nf-co.re/stats#github_prs
# Original code by Phil Ewens, cf. https://github.com/nf-core/nf-co.re/issues/190
# This code is under MIT License, as the original nf-co.re website is
# INSTALL: pip install jinja2 livereload requests xreload
# USAGE: ./build_stats_page.py [--use-dump] [--watch-and-serve] org/repo
import argparse, json, os, sys, types, webbrowser
@LorbusChris
LorbusChris / MatrixIRC.md
Last active December 30, 2022 19:27
Matrix libera.chat IRC Bridge Setup

Matrix libera.chat IRC Bridge Setup

Change libera.chat IRC Nick

This is optional, in case you prefer your nick to be shown as something other than <matrix_nick>[m] on IRC, e.g. just <matrix_nick> (without the [m] suffix) or <libera_nick>.

Open a private chat with @appservice:libera.chat:

!nick <new_libera_nick>

Note: This does not change your Matrix nick!

@jfy133
jfy133 / wikipedia-style-timeline-for-git-repo.R
Last active February 20, 2024 17:52
Throw-away example R/tidyverse script to generate a wikipedia 'band-member timeline' style figure for a git repo
#!/usr/bin/env R
library(tidyverse)
min_commit_count <- 5
## Get raw data: ` git --no-pager log --pretty=format:"%h%x09%an%x09%ad%x09%s" --date=iso | cut -f 2-3 > pipeline_contribs.tsv
data_raw <- read_tsv("pipeline_contribs.tsv", col_names = c("Committer", "Date"))