Skip to content

Instantly share code, notes, and snippets.

View thanhleviet's full-sized avatar
🤗
Focusing

Thanh Lee thanhleviet

🤗
Focusing
View GitHub Profile
@noamross
noamross / disease_tweeps.R
Last active August 29, 2015 14:23
I wanted to make a list of my disease ecology followers and followees on twitter, so...
library(twitteR)
library(rlist)
library(pipeR)
library(stringi)
# Authenticate with twitter
# consumer/access keys and secrets for the twitter API must be defined elsewhere
setup_twitter_oauth(consumer_key, consumer_secret, access_token, access_secret)
# Get all my followers and followees
@sujaikumar
sujaikumar / 2015-11-30-blastp-bug.md
Last active November 2, 2023 04:46
NCBI blastp bug - changing max_target_seqs returns incorrect top hits

NCBI blastp seems to have a bug where it reports different top hits when -max_target_seqs is changed. This is a serious problem because the first 20 hits (for example) should be the same whether -max_target_seqs 100 or -max_target_seqs 500 is used.

The bug is reproducible on the command line when searching NCBI's nr blast database (dated 25-Nov-2015) using NCBI 2.2.28+, 2.2.30+ and 2.2.31+.

At first I thought it was something to do with my local exe/blastdb, but the same problem is also apparent on the NCBI blastp web interface (as of 30-Nov-2015)

@kantale
kantale / example_tool.py
Last active March 8, 2016 04:47
How to setup galaxy with TORQUE in Amazon's cloud
#!/usr/bin/python
import sys
'''
Just a simple tool that adds the line number at
the end of each line
'''
with open(sys.argv[1]) as f_in, open(sys.argv[2], 'w') as f_out:
@wangruohui
wangruohui / Install NVIDIA Driver and CUDA.md
Last active September 27, 2025 02:50
Install NVIDIA Driver and CUDA on Ubuntu / CentOS / Fedora Linux OS
@darogan
darogan / deinterleave_fastq.sh
Created June 17, 2016 16:07 — forked from nathanhaigh/deinterleave_fastq.sh
deinterleave FASTQ files
#!/bin/bash
# Usage: deinterleave_fastq.sh < interleaved.fastq f.fastq r.fastq [compress]
#
# Deinterleaves a FASTQ file of paired reads into two FASTQ
# files specified on the command line. Optionally GZip compresses the output
# FASTQ files using pigz if the 3rd command line argument is the word "compress"
#
# Can deinterleave 100 million paired reads (200 million total
# reads; a 43Gbyte file), in memory (/dev/shm), in 4m15s (255s)
#
@nsoranzo
nsoranzo / gist:c4856ad947ff2eaf6d43e3e471584312
Created February 3, 2017 19:56
Stop the scheduling of a Galaxy workflow invocation
If a handler log is full of messages like:
Workflow step 1585 of invocation 554 delayed
then probably a workflow invocation is stuck because a step was cancelled by a user. After verifying that this is the case, to stop the workflow invocation scheduling connect to the Galaxy database using psql and do the following:
galaxy_db=> SELECT * FROM workflow_invocation WHERE id=554;
id | create_time | update_time | workflow_id | history_id | state | scheduler | handler | uuid
-----+----------------------------+----------------------------+-------------+------------+-------+-----------+----------+----------------------------------
554 | 2016-11-16 17:24:38.586902 | 2016-11-16 17:26:34.555872 | 201 | 485 | ready | core | handler1 | 8d49678eac2111e697b90050569af9e3
@zacharycarter
zacharycarter / wclwn.md
Last active May 22, 2025 15:00
Binding to C Libraries with Nim
@hygull
hygull / LICENSE KEY FOR SUBLIME TEXT 3 BUILD 3143.md
Last active October 14, 2025 15:41
LICENSE KEY FOR SUBLIME TEXT 3 BUILD 3143

STEPS

  • Click on Help menu

  • Select Enter License

  • Then paste given KEY given at bottom

  • Finally click on Use License

@hkwi
hkwi / README.md
Last active July 28, 2020 11:12
libvirt + prometheus + grafana
@aksakalli
aksakalli / install-conda.yml
Created July 18, 2018 10:08
Installing Minicaonda/Anaconda from Ansible playbook for all
- name: Install Conda
block:
- name: Download Miniconda
get_url:
url: https://repo.continuum.io/miniconda/Miniconda3-4.5.4-Linux-x86_64.sh
dest: /tmp/install-miniconda.sh
checksum: md5:a946ea1d0c4a642ddf0c3a26a18bb16d
mode: 0550
- name: Create conda folder