First setup yum to get the right repo:
tee > /tmp/oneAPI.repo << EOF
[oneAPI]
name=Intel(R) oneAPI repository
baseurl=https://yum.repos.intel.com/oneapi
enabled=1
# License: MIT | |
import socket | |
from slacker import Slacker | |
import datetime | |
import time | |
import threading | |
SLACK_TOKEN = 'xoxb-00000000000-000000000000-000000000000000000000000' | |
CHANNEL_NAME = "your-channel-on-slack" |
# Extended python -m http.serve with --username and --password parameters for | |
# basic auth, based on https://gist.github.com/fxsjy/5465353 | |
from functools import partial | |
from http.server import SimpleHTTPRequestHandler, test | |
import base64 | |
import os | |
class AuthHTTPRequestHandler(SimpleHTTPRequestHandler): |
#!/bin/bash | |
set -ex | |
gcc_ver=$(gcc --version | head -n 1 | awk '{print $3}') | |
# Install gcc 4.9 devtoolset | |
if [[ ! "$gcc_ver" =~ 4\.9\.* ]]; then | |
sudo yum install epel-release -y | |
sudo yum install centos-release-scl -y |
A simple tool for extracting discrete color palette values from the viridis collection of color palettes.
# Input: list of rows with format: "<filesize> filename", e.g. | |
# filesizes.txt | |
####################### | |
# 1000K file1.txt | |
# 200M file2.txt | |
# 2G file3.txt | |
# | |
# Output: | |
cat filesizes.txt | numfmt --from=iec | awk 'BEGIN {sum=0} {sum=sum+$1} END {printf "%.0f\n", sum}' |
GNU Parallel is a multipurpose program for running shell commands in parallel, which can often be used to replace shell script loops,find -exec
, and find | xargs
. It provides the --sshlogin
and --sshloginfile
options to farm out jobs to multiple hosts, as well as options for sending and retrieving static resources and and per-job input and output files.
For any particular task, however, keeping track of which files need to pushed to and retrieved from the remote hosts is somewhat of a hassle. Furthermore, cancelled or failed runs can leave garbage on the remote hosts, and if input and output files are large, sending them to local disk on the remote hosts is somewhat inefficient.
In a traditional cluster, this problem would be solved by giving all nodes access to a shared filesystem, usually with NFS or something more exotic. However, NFS doesn't wo
""" | |
Provides functions for the purpose of parsing a Sun Grid Engine (SGE) | |
accounting file for job metadata. | |
""" | |
__author__ = "Sam Nicholls <msn@aber.ac.uk>" | |
__copyright__ = "Copyright (c) Sam Nicholls" | |
__version__ = "0.0.32" | |
__maintainer__ = "Sam Nicholls <msn@aber.ac.uk>" |
#!/usr/bin/env bash | |
brew install openssl | |
git clone git://anongit.mindrot.org/openssh.git | |
cd openssh | |
# The './configure' script does not exist, so we have to build it | |
autoreconf |
#!/bin/bash | |
# | |
# Generates client and server certificates used to enable HTTPS | |
# remote authentication to a Docker daemon. | |
# | |
# See http://docs.docker.com/articles/https/ | |
# | |
# To start the Docker Daemon: | |
# | |
# sudo docker -d \ |