Skip to content

Instantly share code, notes, and snippets.

## GOAL:
## re-create a figure similar to Fig. 2 in Wilson et al. (2018),
## Nature 554: 183-188. Available from:
## https://www.nature.com/articles/nature25479#s1
##
## combines a boxplot (or violin) with the raw data, by splitting each
## category location in two (box on left, raw data on right)
# initial set-up ----------------------------------------------------------
@hyuki0000
hyuki0000 / gengo.rb
Created January 10, 2017 03:43
gengo.rb - 元号ジェネレータ。これまでに元号で使われた漢字からなるすべての二文字列を生成する(4900個)
a = '万中久乾亀亨享仁保元勝化吉同和喜嘉国大天字安宝寛寿平康延建弘徳応感慶成承授政文斉昌明昭景暦正武永治泰白祚神祥禄禎福老至興衡観護貞銅長雉雲霊養'
a.split(//).each do |x|
a.split(//).each do |y|
print "#{x}#{y},"
end
end
@jtallant
jtallant / setting-up-sinatra-with-active-record.md
Last active March 25, 2024 13:26
Setting up Sinatra with Active Record

Setting up Sinatra Project

create an empty project and add a Gemfile

cd ~/Desktop
mkdir project-name
cd project-name
touch Gemfile
@amatsus
amatsus / etc_profile.d_docker.sh
Last active March 13, 2018 07:20
This is a shell function to handling `docker run/stop/pause/unpause` in OGS/GE
#
# docker run wrapper for OGS/GE
#
# Copyright (c) 2016 Akihiro Matsushima
# Released under the MIT license
# http://opensource.org/licenses/mit-license.php
#
function sigconthandler() {
docker unpause $cid
@tonets
tonets / kanazawa.md
Last active March 15, 2016 06:39
BH15.15向け金沢案内
@tfuji
tfuji / biosample2ttl.rb
Created February 20, 2015 02:17
biosample2ttl.rb v0.2
#!/usr/bin/env ruby
require 'nokogiri'
require 'erb'
#require 'uri'
#require 'pp'
class BioSampleSet
include Enumerable
@pcantalupo
pcantalupo / csfq2fq.pl
Created August 19, 2014 16:11
transform colorspace fastq to sanger fastq
#!/usr/bin/env perl
# Based on scripts and discussion found in http://seqanswers.com/forums/showthread.php?t=1425
# and https://www.biostars.org/p/43855/
# This script changes the color space sequence on the 2nd line of each fastq
# to base space. It does not convert the qual string since SOLID qual is
# already in Sanger format. The first base and quality value (primer) are
# discarded.
@tcnksm
tcnksm / docker_cheat.md
Last active August 5, 2021 03:59 — forked from wsargent/docker_cheat.md
Docker 虎の巻

Docker 虎の巻

何故Dockerを使うべきか

Why Should I Care (For Developers)

"Dockerが面白いのはシンプルな環境に隔離性と再現性をもたらしてくれることだ.ランタイムの環境を一度作れば、パッケージにして別のマシンでも再利用することできる.さらに,すべてはホスト内の隔離された環境で行われる(VMのように).最も素晴らしい点は,シンプルかつ高速であることだ."

@faultier
faultier / data.csv
Last active December 29, 2015 02:29
阿賀野型ってあれでしょ?一番艦阿賀野、二番艦能代、三番艦阿賀野、四番艦阿賀野だよね…
We can make this file beautiful and searchable if this error is corrected: It looks like row 8 should actually have 6 columns, instead of 5 in line 7.
戦果,艦種,艦級,艦名,レア度,余談
S,軽空母,祥鳳型,祥鳳,3,半裸の人
A,正規空母,蒼龍型,蒼龍,4,
S,重巡洋艦,妙高型,妙高,3,
1,,,,,
C,,,,,
A,重巡洋艦,最上型,最上,3,
C,,,,
A,軽巡洋艦,長良型,鬼怒,3,マジパナイ鬼怒ちゃんマジパナイ
3,,,,,お仕置き部屋

An Elasticsearch in Crash Course!

By Andrew Cholakian

All examples use the Stretcher ruby gem

What is Elasticsearch?

  • An Information Retrieval (IR) System
  • A way to search your data in terms of natural language, and so much more