conda install -yc conda-forge mamba
mamba create -n jupyteR -yc r -c conda-forge \
r-essentials r-base ipykernel jupyterlab r-irkernel
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
! 2022-09-20 https://www.r-bloggers.com | |
||www.r-bloggers.com/wp-content/uploads/2022/07/earl2022_agenda-1.*$image | |
www.r-bloggers.com###text-18 > .textwidget > div | |
! 2022-09-28 https://www.programiz.com | |
||cdn.programiz.com/sites/all/themes/programiz/assets/programiz-pro-bts-sale-pop-up.png$image | |
@@||dailymotion.com^$ghide | |
! https://youtube.com | |
www.youtube.com##ytd-guide-renderer a.yt-simple-endpoint path[d^="M10 14.65v-5.3L15 12l-5 2.65zm7.77-4.33"]:upward(ytd-guide-entry-renderer) |
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 json | |
import time | |
from pathlib import Path | |
from bs4 import BeautifulSoup as bs | |
from selenium import webdriver | |
from selenium.webdriver.chrome.service import Service | |
with open(Path.home() / "ysblf.txt", "r", encoding="utf-8") as file: | |
ysblf_links = file.read().split() |
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 python3 | |
from Bio.Blast.Applications import NcbiblastnCommandline | |
import pandas as pd | |
cline = NcbiblastnCommandline(query='insulin.fasta', remote=True, outfmt=6, out='-') | |
output = cline()[0].strip() | |
rows = [line.split() for line in output.splitlines()] | |
cols = ['qseqid', 'sseqid', 'pident', 'length', |
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
# macOS | |
cd ~/.ssh | |
ssh-keygen -f ~/.ssh/id_rsa_github -t rsa -C "[email protected]" | |
ssh-add ~/.ssh/id_rsa_github | |
# ssh-add -l | |
# Add the key to Github |
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
# MiSeq | |
bcl2fastq -R . -r 10 -p 10 -w 10 \ | |
--fastq-compression-level 9 \ | |
--barcode-mismatches 2 \ | |
-l NONE -o fastq_files \ | |
--sample-sheet SampleSheet.csv | |
# Nextseq | |
bcl2fastq -R . --no-lane-splitting \ | |
-r 10 -p 10 -w 10 \ |
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
# Backup conda environments | |
envs=$(conda env list | awk -e '$0 ~ /^\w/ {print $1}') | |
for env in ${envs} | |
do | |
source activate ${env} | |
conda env export > ${env}.yml | |
conda deactivate | |
done | |
# Restore conda environments |
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
[credentials] | |
token = 123456:ABCDEF1234ghIkl-zyx57W2v1u123ew11 |
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
# Install current version from CRAN: | |
# https://cran.r-project.org/bin/macosx/R-4.0.0.pkg | |
# Get which version of R a package was built with | |
pkgs <- as.data.frame(installed.packages(), stringsAsFactors = FALSE, row.names = FALSE) | |
pkgs[, c("Package", "Version", "Built")] | |
# Update packages, source instead binary for MacOS | |
update.packages(ask = FALSE, checkBuilt = TRUE, type = 'source') |
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
;# getopts.pl - a better getopt.pl | |
;# Usage: | |
;# do Getopts('a:bc'); # -a takes arg. -b & -c not. Sets opt_* as a | |
;# # side effect. | |
sub Getopts { | |
local($argumentative) = @_; | |
local(@args,$_,$first,$rest); | |
local($errs) = 0; |
NewerOlder