Skip to content

Instantly share code, notes, and snippets.

Avatar

George Hartzell hartzell

View GitHub Profile
View gist:e0b03757bb02c86ead340aa96c7cd3d6
echo -n "CAAT" | perl -pe '{tr/atcgATCG/tagcTAGC/; $_=reverse}'
or for IUPAC:
tr/ABCDGHMNRSTUVWXYabcdghmnrstuvwxy/TVGHCDKNYSAABWXRtvghcdknysaabwxr/;
@hartzell
hartzell / emacs-profile.txt
Created Jun 10, 2020
esup profile of my emacs startup on AWS
View emacs-profile.txt
$ cat emacs-profile
Built an X emacs and ran esup. Here's what it told me:
FWIW: The total of the non-zero times excluding sm-modules is 3.95....
---
Total User Startup Time: 17.204sec Total Number of GC Pauses: 0 Total GC Time: 0.000sec
@hartzell
hartzell / dropdown-value-not-reset.py
Created Jun 6, 2020
Demo of the dropdown's value not being reset when it is removed from the list of options.
View dropdown-value-not-reset.py
import dash
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output, State
from dash.exceptions import PreventUpdate
from flask import Flask, send_file
server = Flask(__name__)
app = dash.Dash(server=server)
@hartzell
hartzell / uploader-not-reset.py
Created Jun 6, 2020
Demo of possible bug with Dash Upload component
View uploader-not-reset.py
# this has a problem that the "new_jobs" values aren't reset after
# being used.
import dash
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output, State
from dash.exceptions import PreventUpdate
from flask import Flask, send_file
server = Flask(__name__)
@hartzell
hartzell / upload.py
Created Jun 2, 2020
Simple sample Dash uploader script, sometimes complains 'Failed to fetch'
View upload.py
import dash
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output, State
from flask import Flask
server = Flask(__name__)
app = dash.Dash(server=server)
@hartzell
hartzell / spack-debug-output
Created Feb 28, 2020
spack install unable to use checksum generated by spack checksum
View spack-debug-output
[ghartzell@bifx1n03 spack-update-kallisto]$ spack -d install kallisto
==> [2020-02-28-15:43:15.438065, 15427] Imported install from built-in commands
==> [2020-02-28-15:43:15.439304, 15427] Reading config file /home/ghartzell/tmp/spack-update-kallisto/etc/spack/defaults/config.yaml
==> [2020-02-28-15:43:15.453801, 15427] Imported install from built-in commands
==> [2020-02-28-15:43:15.455972, 15427] Reading config file /home/ghartzell/tmp/spack-update-kallisto/etc/spack/defaults/repos.yaml
==> [2020-02-28-15:43:15.525066, 15427] Reading config file /home/ghartzell/tmp/spack-update-kallisto/etc/spack/defaults/packages.yaml
==> [2020-02-28-15:43:15.541270, 15427] READ LOCK: /home/ghartzell/.spack/cache/tags/.builtin-index.json.lock[0:0] [Acquiring]
==> [2020-02-28-15:43:15.541371, 15427] read locking [0:0]: timeout 120 sec
==> [2020-02-28-15:43:15.541434, 15427] READ LOCK: /home/ghartzell/.spack/cache/tags/.builtin-index.json.lock[0:0] [Acquired at 15:43:15.541416]
==> [2020-02-28-15:43:15.541831, 15427] READ L
@hartzell
hartzell / failing-test-case.md
Last active Jan 29, 2020
Demo of failing and working cases of connecting to files.pythonhosted.org
View failing-test-case.md
(alice)[16:00:11]~>>/usr/bin/openssl s_client -connect files.pythonhosted.org:443
CONNECTED(00000005)
depth=1 C = BE, O = GlobalSign nv-sa, CN = GlobalSign CloudSSL CA - SHA256 - G3
verify error:num=20:unable to get local issuer certificate
verify return:0
---
Certificate chain
 0 s:/C=US/ST=California/L=San Francisco/O=Fastly, Inc/CN=r.ssl.fastly.net
   i:/C=BE/O=GlobalSign nv-sa/CN=GlobalSign CloudSSL CA - SHA256 - G3
@hartzell
hartzell / simple-spack-install.sh
Created Dec 3, 2019
Simplified version of a script for providing a big bunch of things with Spack
View simple-spack-install.sh
#!/bin/sh
set -e
# having an app tree set up messes up the build. Clear the field.
if [[ $(type -t module) == "function" ]]; then
module purge
fi
cat << "EOYAML" > etc/spack/packages.yaml
packages:
@hartzell
hartzell / .lircrc-A1156
Last active Mar 4, 2020
Configuring a headless PiCorePlayer to use an Apple 1294 IR remote
View .lircrc-A1156
begin
remote = Apple_A1156
button = KEY_UP
repeat = 0
prog = squeezelite
config = volup
end
begin
remote = Apple_A1156
@hartzell
hartzell / udev
Last active May 20, 2019
Amazon Linux udev rules
View udev
# Copyright (C) 2006-2016 Amazon.com, Inc. or its affiliates.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# A copy of the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompanying this file. This file is
You can’t perform that action at this time.