This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -euo pipefail | |
| rm -rf genbank/ | |
| rsync \ | |
| --archive \ | |
| --progress \ | |
| --recursive \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -euo pipefail | |
| function get_source() { | |
| curl --silent "http://greengenes.secondgenome.com/downloads/database/13_5" | |
| } | |
| function get_urls() { | |
| get_source | grep 'https:' | grep s3 | cut -d '"' -f 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env Rscript | |
| library(R6) | |
| library(testthat) | |
| Argument <- R6Class('Argument', | |
| public = list( | |
| flag = NA, | |
| help = NA, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "os" | |
| "fmt" | |
| "bufio" | |
| ) | |
| func main() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class DNA: | |
| def __init__(self, sequence: str) -> None: | |
| self.sequence = str(sequence).lower() | |
| @property | |
| def reverse(self) -> 'DNA': | |
| return DNA(self.sequence[::-1]) | |
| @property |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| import requests | |
| from bs4 import BeautifulSoup | |
| url = 'http://www.berkeleybowl.com/daily-hot-soup' | |
| res = requests.get(url) | |
| soup = BeautifulSoup(res.content, 'html5lib') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Render | |
| def self.[](engine:) | |
| p engine | |
| end | |
| end | |
| Render[engine: 'doot'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Boat | |
| class << self | |
| def <=> boat | |
| boat | |
| end | |
| def [] boat | |
| boat | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| # download all genomes from ncbi using 8 processes | |
| # ./ncbi-fetch.rb | xargs -I {} -n1 -p 8 wget {} | |
| File.open('assembly_summary.txt').each do |line| | |
| row = line.strip.split("\t") | |
| base_url = row[19] | |
| next if base_url.nil? | |
| dir = base_url.split('/').last |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| test: .PHONY | |
| @python -m 'nose' --nocapture | |
| ftest: .PHONY | |
| @python -m 'nose' --with-focus --nocapture | |
| clean: | |
| @git clean -f | |
| .PHONY: |