zsh
terminal
Add these lines in your ~/.bash_profile
file
# Show current git branch name
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
# /etc/systemd/system/blackd.service | |
# sudo systemctl start blackd | |
# sudo systemctl enable blackd | |
# sudo systemctl status blackd | |
[Unit] | |
Description=Black Formatter Service | |
[Service] | |
ExecStart=/home/brian/bin/miniconda3/bin/blackd --bind-host=127.0.0.1 |
def commitHashForBuild(build) { | |
def scmAction = build?.actions.find { action -> action instanceof jenkins.scm.api.SCMRevisionAction } | |
if (scmAction?.revision instanceof org.jenkinsci.plugins.github_branch_source.PullRequestSCMRevision) { | |
return scmAction?.revision?.pullHash | |
} else if (scmAction?.revision instanceof jenkins.plugins.git.AbstractGitSCMSource$SCMRevisionImpl) { | |
return scmAction?.revision?.hash | |
} else { | |
error("Build doesn't contain revision information. Do you run this from GitHub organization folder?") | |
} | |
} |
$ conda uninstall --force jpeg libtiff -y | |
$ conda install -c conda-forge libjpeg-turbo | |
$ CC="cc -mavx2" pip install --no-cache-dir -U --force-reinstall pillow-simd |
Jenkins.instance.queue.items.findAll { !it.task.name.contains("Extenda") }.each { | |
println "Cancel ${it.task.name}" | |
Jenkins.instance.queue.cancel(it.task) | |
} | |
Jenkins.instance.items.each { | |
stopJobs(it) | |
} | |
def stopJobs(job) { | |
if (job in jenkins.branch.OrganizationFolder) { | |
// Git behaves well so no need to traverse it. |
from sklearn.manifold import TSNE | |
from sklearn.preprocessing import MinMaxScaler | |
def get_scaled_tsne_embeddings(features, perplexity, iteration): | |
embedding = TSNE(n_components=2, | |
perplexity=perplexity, | |
n_iter=iteration).fit_transform(features) | |
scaler = MinMaxScaler() | |
scaler.fit(embedding) |
import umap | |
from sklearn.preprocessing import MinMaxScaler | |
def get_scaled_umap_embeddings(features, neighbour, distance): | |
embedding = umap.UMAP(n_neighbors=neighbour, | |
min_dist=distance, | |
metric='correlation').fit_transform(features) | |
scaler = MinMaxScaler() |
# install from this website | |
http://docs.couchdb.org/en/latest/install/unix.html#installation-using-the-apache-couchdb-convenience-binary-packages | |
# add this to apt sources so that libicu55 is available (libicu57 has replaced it in zesty) | |
deb http://security.ubuntu.com/ubuntu xenial-security main |
# Created by https://www.gitignore.io/api/c++,cmake | |
### C++ ### | |
# Prerequisites | |
*.d | |
# Compiled Object files | |
*.slo | |
*.lo |
#!/bin/bash | |
BIN=/usr/bin | |
MAN=/usr/share/man/man1 | |
PRIORITY=360 | |
BINV=3.6 | |
MANV=3.6.1 | |
update-alternatives --install $BIN/clang clang $BIN/clang-$BINV $PRIORITY \ |