(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf
:
# 0 is too far from ` ;) | |
set -g base-index 1 | |
# Automatically set window title | |
set-window-option -g automatic-rename on | |
set-option -g set-titles on | |
#set -g default-terminal screen-256color | |
set -g status-keys vi | |
set -g history-limit 10000 |
function obfuscateText(coded, key) { | |
// Email obfuscator script 2.1 by Tim Williams, University of Arizona | |
// Random encryption key feature by Andrew Moulden, Site Engineering Ltd | |
// This code is freeware provided these four comment lines remain intact | |
// A wizard to generate this code is at http://www.jottings.com/obfuscator/ | |
shift = coded.length | |
link = "" | |
for (i = 0; i < coded.length; i++) { | |
if (key.indexOf(coded.charAt(i)) == -1) { | |
ltr = coded.charAt(i) |
import matplotlib | |
matplotlib.use('webagg') | |
import numpy as np | |
from scipy.special import binom | |
import matplotlib.pyplot as plt | |
from matplotlib.lines import Line2D |
/* | |
Add the following decleration to EthernetUdp.h directly after line 55 | |
virtual uint8_t beginMulti(IPAddress, uint16_t); | |
then add the following code to the end of EthernetUdp.c | |
*/ | |
Cython has two major benefits:
Cython gains most of it's benefit from statically typing arguments. However, statically typing is not required, in fact, regular python code is valid cython (but don't expect much of a speed up). By incrementally adding more type information, the code can speed up by several factors. This gist just provides a very basic usage of cython.
#!/usr/bin/env zsh | |
# Initialize VPN | |
sudo vpnns up | |
sudo vpnns start_vpn | |
# Popcorn time! | |
sudo ip netns exec frootvpn sudo -u $USER popcorntime | |
# Cleanup |
$ python3 interrupt-debug.py | |
0 | |
1 | |
2 | |
3 | |
^C--Return-- | |
> /home/takluyver/scratch/interrupt-debug.py(6)handle_sigint()->None | |
-> pdb.set_trace() | |
(Pdb) p a | |
4 |
def dot_product(x, kernel): | |
""" | |
Wrapper for dot product operation, in order to be compatible with both | |
Theano and Tensorflow | |
Args: | |
x (): input | |
kernel (): weights | |
Returns: | |
""" | |
if K.backend() == 'tensorflow': |