#!/usr/bin/python -O | |
import numpy as np | |
from numpy import array | |
A, C, G, T = 0, 1, 2, 3 | |
int_to_char = {0:'A', 1:'C', 2:'G', 3:'T'} | |
#indel = -1 | |
#scoring = array([[1,-1,-1,-1], | |
#[-1,1,-1,-1], |
#!/bin/sh | |
### | |
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
### | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
#!/bin/bash | |
# NVM_NODE_UPDATER | |
# v2.0.0 | |
# | |
# Makes keeping NVM-managed, global NodeJS installations up-to-date a breeze. | |
# First, the global NodeJS installation is updated to 'latest'. | |
# Second, all global NPM packages are migrated, then also updated to 'latest'. | |
# Requires the Node Version Manager (https://github.com/creationix/nvm). | |
# |
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env | |
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced | |
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start | |
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running. | |
# Add the following to your shell init to set up gpg-agent automatically for every shell | |
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then | |
source ~/.gnupg/.gpg-agent-info | |
export GPG_AGENT_INFO | |
else |
These instructions compile a native OS X version of libnfc, and adjust its internal paths and those of its dependencies to allow you to use it from any arbitrary working directory, which is normally restricted in versions of OS X with System Integrity Protection.
Assumes OS X with Xcode or Xcode command-line tools, not macports or homebrew
To install Xcode command-line tools in recent versions of OS X, open Terminal, type xcode-select --install
and click "Install"
Older versions of OS X may need to manually download disk images of older versions of Xcode and/or the Xcode command-line tools, as various certificates may have expired (e.g. 10.7.4 requires a manual install from the Xcode 4.6.2 command-line tools image)
Download latest pkg-config (tested with 0.29.1) from https://pkg-config.freedesktop.org/releases/?C=M;O=D
-- A global variable for the Hyper Mode | |
k = hs.hotkey.modal.new({}, "F17") | |
-- Trigger existing hyper key shortcuts | |
k:bind({}, 'm', nil, function() hs.eventtap.keyStroke({"cmd","alt","shift","ctrl"}, 'm') end) | |
-- OR build your own | |
launch = function(appname) |
-- hattip https://github.com/lodestone/hyper-hacks | |
-- hattip https://gist.github.com/ttscoff/cce98a711b5476166792d5e6f1ac5907 | |
-- A global variable for the sub-key Hyper Mode | |
k = hs.hotkey.modal.new({}, 'F18') | |
-- Hyper+key for all the below are setup somewhere | |
-- The handler already exists, usually in Keyboard Maestro | |
-- we just have to get the right keystroke sent |