Skip to content

Instantly share code, notes, and snippets.

add_anaconda_token: True
add_pip_as_python_dependency: True
aggressive_update_packages:
- ca-certificates
- certifi
- openssl
allow_conda_downgrades: False
allow_cycles: True
allow_non_channel_urls: False
allow_softlinks: False
@amccarty
amccarty / jlabpatch.md
Last active April 8, 2020 15:26
Jupyterlab Timeout Patch

1. Download patched image to master node:

curl -O https://aaron-svc.s3.amazonaws.com/jupyter_patch.tar.gz

2. Move it to /var/lib/gravity/planet/share:

cp jupyter_patch.tar.gz /var/lib/gravity/planet/share

3. Enter gravity:

@amccarty
amccarty / fio_iops
Last active December 12, 2019 21:49
fio
fio --loops=5 --size=1000m --filename=/tmpfiotest.tmp --stonewall --ioengine=libaio --direct=1 --name=Seqread --bs=1m --rw=read --name=Seqwrite --bs=1m --rw=write --name=512Kread --bs=512k --rw=randread --name=512Kwrite --bs=512k --rw=randwrite --name=4kQD32read --bs=4k --iodepth=32 --rw=randread --name=4kQD32write --bs=4k --iodepth=32 --rw=randwrite
[root@ip-172-31-57-189 ~]# fio --loops=5 --size=1000m --filename=/tmpfiotest.tmp --stonewall --ioengine=libaio --direct=1 --name=Seqread --bs=1m --rw=read --name=Seqwrite --bs=1m --rw=write --name=512Kread --bs=512k --rw=randread --name=512Kwrite --bs=512k --rw=randwrite --name=4kQD32read --bs=4k --iodepth=32 --rw=randread --name=4kQD32write --bs=4k --iodepth=32 --rw=randwrite
Seqread: (g=0): rw=read, bs=(R) 1024KiB-1024KiB, (W) 1024KiB-1024KiB, (T) 1024KiB-1024KiB, ioengine=libaio, iodepth=1
Seqwrite: (g=1): rw=write, bs=(R) 1024KiB-1024KiB, (W) 1024KiB-1024KiB, (T) 1024KiB-1024KiB, ioengine=libaio, iodepth=1
512Kread: (g=2): rw=rand
@amccarty
amccarty / condaproxy.md
Last active February 7, 2020 20:53
AE5 proxy for public repos

Configure AE5 5.x to Use a Proxy for Conda Packages

Miscellaneous:

sudo yum install tmux

export HTTP_PROXY=proxy.aws.att.com:3128

export HTTPS_PROXY=$HTTP_PROXY
Delivered-To: ilindsey@anaconda.com
Received: by 2002:a17:906:6193:0:0:0:0 with SMTP id q19csp3033214ejk;
Wed, 6 Feb 2019 09:07:05 -0800 (PST)
X-Received: by 2002:a9d:68ce:: with SMTP id i14mr2571633oto.143.1549472825744;
Wed, 06 Feb 2019 09:07:05 -0800 (PST)
ARC-Seal: i=2; a=rsa-sha256; t=1549472825; cv=pass;
d=google.com; s=arc-20160816;
b=Uc/klVpPVc3bDgxmRzW/5ZHVCk8AwAMzn3zbYRinIujvuEfxGLF6qAe9x/e/A5Hdgm
+khq1jNiJfYtXqOuhvGT6A1PoqP+EUQpVmUsmbqth067gOr+9Ne4rRuD1RtCFQtKHMGM
MqoNm6UYKj7/4xlgTOZc13v9U/FZzbBEGXfbSZ31Qv0xnbepXyyIrxoKZ1Wigbr1vdHn
lab_launch) conda info
Current conda install:
platform : linux-64
conda version : 4.3.32
conda is private : False
conda-env version : 4.3.32
conda-build version : not installed
python version : 3.6.2.final.0
requests version : 2.18.4
#!/usr/bin/env bash
set -eux
OS="$(gawk -F= '/^NAME/{print $2}' /etc/os-release | sed 's/"//g')"
echo "Detected ${OS} Distro"
if [[ "$OS" =~ ^(CentOS\ Linux|RedHat|Ubuntu)$ ]]; then
@amccarty
amccarty / .condarc
Created June 13, 2018 22:28
Conda with conda-forge
conda:
channels:
- defaults
default-channels:
- https://conda.anaconda.org/conda-forge/osx-64
- https://conda.anaconda.org/conda-forge/noarch
- https://repo.continuum.io/pkgs/main
- https://repo.continuum.io/pkgs/free
- https://repo.continuum.io/pkgs/r
- https://repo.continuum.io/pkgs/pro
@amccarty
amccarty / undefined.php
Created June 1, 2017 19:25
PHP Notice: Undefined variable: record in /cul/web/fantastic.library.cornell.edu/htdocs/imagerecord.php on line 22
<html>
<head>
<title>Fantastic... Image Record</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="css/main.css" />
</head>
<body>
<?php include("inc/topData.html") ?>
@amccarty
amccarty / gist:c5e5a14e6b45be4279f2c525904f569d
Created March 29, 2017 14:31
Prepend to a sql file before importing via command line
sed -i '1s;^;SET\ FOREIGN_KEY_CHECKS\ =\ 0\;\nSET\ UNIQUE_CHECKS\ = \ 0\;\nSET\ AUTOCOMMIT\ =\ 0\;\n;' scholarsdev-opt.sql