This file contains 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 bash | |
source _script_source.sh | |
set -e | |
has_traefik_pods() { | |
L=$(kubectl get pods -n kube-system -lapp=svclb-traefik 2>/dev/null | wc -l) | |
if [ $L -eq 0 ]; then | |
false | |
else | |
true |
This file contains 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
FROM debian:10-slim | |
## Otherwise Java won't install | |
RUN mkdir -p /usr/share/man/man1 | |
RUN apt-get update \ | |
&& apt-get install -y gnupg2 | |
## This is to get openjdk-11-jre to install on -slim | |
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EA8CACC073C3DB2A |
This file contains 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 perl | |
use strict; | |
use warnings; | |
my %stats = ( | |
'+' => { qw/comment 0 whitespace 0 code 0/ }, | |
'-' => { qw/comment 0 whitespace 0 code 0/ }, | |
); |
This file contains 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
<html> | |
<head> | |
<style> | |
div.q, div.a { | |
float: left; | |
width: 4.0em; | |
font-size: 14pt; | |
margin-bottom: 1em; | |
} |
This file contains 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
// Hack nextflow workflow that removes intermediate files generated | |
// by process A once process B is done with the files | |
inputA = Channel.from( | |
[1, file('f1')], | |
[2, file('f2')], | |
[3, file('f3')], | |
[4, file('f4')], | |
[5, file('f5')]) |
This file contains 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 bash | |
## Backup clone | |
git clone [email protected]:NBISweden/LocalEGA.git LocalEGA-backup-$(date +"%Y-%m-%d_%H:%M:%S") | |
## Clone it | |
[ -d LocalEGA-cleaning ] && rm -rf LocalEGA-cleaning | |
git clone [email protected]:NBISweden/LocalEGA.git LocalEGA-cleaning | |
cd LocalEGA-cleaning |
This file contains 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 | |
MYSQL_PORT=3366 | |
MYSQL_HOST=127.0.0.1 | |
MYSQL_PASS=rootpw | |
# Start a mysql instance with docker for example like this: | |
docker volume create swefreq-mysql-data | |
docker run -v swefreq-mysql-data:/var/lib/mysql --rm --name mysql -e MYSQL_ROOT_PASSWORD=$MYSQL_PASS -d -p $MYSQL_PORT:3306 mysql |
This file contains 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
import markovify | |
import json | |
import os | |
users = json.load(open('slack/users.json')) | |
user = '' | |
for u in users: | |
if u['name'] == 'viklund': | |
user = u['id'] |
This file contains 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 | |
require 'octokit' | |
require 'set' | |
def repo_name(repo) | |
return ORG + "/" + repo[:name] | |
end | |
ORG = "NBISweden" |
This file contains 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
$ awk '$4>50 && $3>90 && F[$1]++ < 1{print}' blast_result | |
$4 is column 4 i.e. length, larger than 50bp | |
$3 percent identity bigger than 90 | |
F[$1]++ < 1 is the tricky part. We count upwards for each query we find and as long as the number | |
is less than 1 it is true, since the ++ is after the F[$1] the value will be zero the first time | |
and 1 the second time and so on. |
NewerOlder