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 | |
#coding=utf-8 | |
import subprocess | |
IP = subprocess.run("dig +short myip.opendns.com @resolver1.opendns.com".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode('UTF-8').split()[0] | |
print("IP:", IP) | |
# https://api.aliyun.com/new#/?product=Alidns&api=UpdateDomainRecord¶ms={}&tab=DEMO&lang=PYTHON |
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
help: | |
@echo Put this script at the root of the git project. | |
@echo | |
@echo Add the following lines to the .gitignore file: | |
@echo " ""**/UV/**" | |
@echo " ""!**/UV/unversioned" | |
@echo | |
@echo Run | |
@echo " ""make unversioned" | |
@echo to create the listings of unversioned files in |
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
virtualenv -p python3.7 venv | |
source venv/bin/activate | |
pip install pandas numpy sklearn joblib progressbar2 matplotlib |
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
# RA, 2020-01-01 | |
from numpy import sqrt, exp | |
import numpy as np | |
from scipy.special import binom, erf | |
import matplotlib.pyplot as plt | |
# Values of b | |
bb = [0.1, 0.5, 1.5] |
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
# RA, 2020-01-02 | |
from numpy import sqrt, exp, pi | |
import numpy as np | |
from scipy.special import binom | |
import matplotlib.pyplot as plt | |
fig: plt.Figure | |
ax: plt.Axes |
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
import numpy as np | |
import pandas as pd | |
import networkx as nx | |
import re | |
import json | |
import pickle | |
from pathlib import Path |
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
# RA, 2020-04-30 | |
# Download exchange rates -- template | |
import json | |
import urllib.request | |
from retry import retry | |
from pathlib import Path | |
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
# RA, 2020-09-12 | |
# A look at the GSE60880: | |
# Human Lung Fibroblasts treated with TGFbeta, IL1, EGF and small molecule inhibitors of TGFBR1 and p38. | |
# HLF cells were incubated with each agent for 0.5 hours, 1 hour, 2 hours or 8 hours in standard conditions | |
# before total RNA was prepared and hybridised to Affymetrix microarrays. | |
# https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE60880 | |
from tcga.utils import download | |
download = download.to(rel_path="download") |
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
# Display a PDF file in 2x1 portrait format for printing | |
pdfjam --nup 2x1 --landscape "file.pdf" --outfile /dev/stdout | \ | |
pdfjam --angle=90 /dev/stdin --outfile /dev/stdout | \ | |
okular - |
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
% 2020-HS Intro Bio Computers | |
% SimBiology first script -- modified to index names of species | |
% The trick | |
index_of = containers.Map(); | |
for i = 1 : length(BioComp_1.Species) | |
index_of(BioComp_1.Species(i).Name) = i; | |
end | |
clear AB; |