Skip to content

Instantly share code, notes, and snippets.

💭
Reversing the polarity

Dan Bolser dbolser

💭
Reversing the polarity
Block or report user

Report or block dbolser

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View some.py
class Order:
order = {}
def __init__(self, Amount, Price, ID, Side):
self.order = {
'Amount': Amount,
'Price': Price,
'Id': ID,
@dbolser
dbolser / example_pattern.js
Last active Apr 29, 2019
Should I be writing JS like this?
View example_pattern.js
// A variable to know when to exit the 'inner' function. When entered = data.length, we know we can safely continue.
var entered = 0
var mah_list = []
async function inner(d, dlength){
// SQL2
setTimeout(function(){
console.log('inner', d, dlength)
mah_list.push(d)
View some.sh
# -serial stdio: redirect the virtual hosts stdio to my console
cur=$(pwd)
sudo qemu-system-arm \
-m 2048 \
-M virt \
-cpu cortex-a15 \
-nographic \
-kernel ${cur}/archlinux-latest/zImage \
-append "root=/dev/vda1 rootfstype=ext4 rw" \
View some.py
#!/usr/bin/env python
# -1) Why wouldn't I use wc?
from pathlib import Path
# 0) Hopefully making things more maintainable...
import argparse
parser = argparse.ArgumentParser(
@dbolser
dbolser / dummy data.txt
Last active Aug 17, 2018
Some dummy alignment data to chain.
View dummy data.txt
+---------------+------------------+----------------+-------------------+-------------------+----------------+-----------+---------+------------+------------+------------+-------+------------------+
| seq_region_id | seq_region_start | seq_region_end | seq_region_length | seq_region_strand | hit_name | hit_start | hit_end | hit_length | hit_strand | perc_ident | score | evalue |
+---------------+------------------+----------------+-------------------+-------------------+----------------+-----------+---------+------------+------------+------------+-------+------------------+
| 82 | 9191436 | 9192063 | 628 | -1 | XR_001930025.1 | 353 | 958 | 606 | 1 | 79 | 221 | 5e-112 |
| 82 | 8315905 | 8316314 | 410 | -1 | XR_001930025.1 | 596 | 1008 | 413 | 1 | 84 | 210 | 4e-106 |
| 127 | 377
View gist:2982ae5ca5b16d3ec29a68d07a9ca541
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by python configure 2.7, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure --prefix /homes/dbolser/EG_Places/Devel/Build/Python-2.7.15-install --enable-shared --enable-unicode=ucs4
## --------- ##
## Platform. ##
View gist:ba985216a50728b884b54441f01b77df
[dbolser@ebi-cli-001 Solidi]$ ../virtualenv-1.5.2/virtualenv.py --no-site-packages myenv
New python executable in myenv/bin/python
Installing setuptools.....................
Complete output from command /nfs/production/panda/ensemblg...ython -c "#!python
\"\"\"Bootstrap setuptoo...
" --always-copy -U setuptools:
View gist:c2ed80ce8eeda71bf2ac7f3e5e2ead3e
./python -E -tt -m test.regrtest -v test_anydbm
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Traceback (most recent call last):
File "/nfs/production/panda/ensemblgenomes/development/dbolser/Build/Python-2.7.14/Lib/site.py", line 539, in <module>
main()
File "/nfs/production/panda/ensemblgenomes/development/dbolser/Build/Python-2.7.14/Lib/site.py", line 521, in main
known_paths = addusersitepackages(known_paths)
File "/nfs/production/panda/ensemblgenomes/development/dbolser/Build/Python-2.7.14/Lib/site.py", line 266, in addusersitepackages
user_site = getusersitepackages()
View gist:1a5f48e2d5a16d9096a0c2ecf707daf4
[dbolser@ebi6-063 Python-2.7.14]$ make
running build
running build_ext
building dbm using ndbm
building '_tkinter' extension
gcc -pthread -fPIC -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DWITH_APPINIT=1 -I/usr/X11/include -I. -IInclude -I./Include -I/usr/local/include -I/nfs/production/panda/ensemblgenomes/development/dbolser/Build/Python-2.7.14/Include -I/nfs/production/panda/ensemblgenomes/development/dbolser/Build/Python-2.7.14 -c /nfs/production/panda/ensemblgenomes/development/dbolser/Build/Python-2.7.14/Modules/_tkinter.c -o build/temp.linux-x86_64-2.7/nfs/production/panda/ensemblgenomes/development/dbolser/Build/Python-2.7.14/Modules/_tkinter.o
gcc -pthread -fPIC -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DWITH_APPINIT=1 -I/usr/X11/include -I. -IInclude -I./Include -I/usr/local/include -I/nfs/production/panda/ensemblgenomes/development/dbolser/Build/Python-2.7.14/Include -I/nfs/production/panda/ensemblgenomes/development/dbolser/Bu
@dbolser
dbolser / -
Created Mar 6, 2017 — forked from anonymous/-
View -
sudo apt-get update | pastebin
Hit:1 http://archive.canonical.com/ubuntu xenial InRelease
Ign:2 http://www.mirrorservice.org/sites/packages.linuxmint.com/packages serena InRelease
Hit:3 http://archive.ubuntu.com/ubuntu xenial InRelease
Get:4 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
Hit:5 http://www.mirrorservice.org/sites/packages.linuxmint.com/packages serena Release
Get:6 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]
Get:7 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Ign:8 https://download.docker.com/linux/ubuntu serena InRelease
Ign:9 https://download.docker.com/linux/ubuntu serena Release
You can’t perform that action at this time.