This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Cycle tabbing options | |
map <leader><tab> :call CycleTabs()<CR> | |
fun! CycleTabs() | |
if !&expandtab | |
echo "4 space tabs" | |
set shiftwidth=4 | |
set softtabstop=4 | |
set tabstop=4 | |
set expandtab | |
elseif &expandtab && &shiftwidth == 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo rm -rf /dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -* | |
def ishappy_recurse(num): | |
if num == 1: | |
print "{} is so happy!".format(num) | |
digits_str = [str(d) for d in str(num)] | |
digits_int = [int(d) for d in str(num)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare -a ip_address | |
for i in {3..1}; do | |
# bash fails when using ${var: -n} to trim strings if the number is greater | |
# than the number of characters. So this uses ${#var} to test the length | |
# huehuehue | |
last_3=${store_id: ${#store_id}<3?0:-3} | |
if [ $last_3 -gt 255 ]; then | |
last_3=${last_3: -2} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow as tf | |
from tensorflow.examples.tutorials.mnist import input_data | |
mnist = input_data.read_data_sets("MNIST_data/", one_hot=True) | |
# 784 pixels (28 x 28 pixel images), 10 possibile outputs | |
x = tf.placeholder(tf.float32, [None, 784]) # placeholder | |
W = tf.Variable(tf.zeros([784, 10])) # weights | |
b = tf.Variable(tf.zeros([10])) # biases |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow as tf | |
from tensorflow.examples.tutorials.mnist import input_data | |
mnist = input_data.read_data_sets("MNIST_data/", one_hot=True) | |
def weight_variable(shape): | |
initial = tf.truncated_normal(shape, stddev=0.1) | |
return tf.Variable(initial) | |
def bias_variable(shape): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[4800x0C:07:19nick@nijotz~/.weechat/logs]$ grep -B1 LOLBOW irc.freenode.#infoforcefeed.weechatlog | grep -Ev '(LOLBOW|--)' | awk '{print $3}' | sort | uniq -c | sort -nr | |
24 cblgh | |
17 nijotz | |
17 jnerula | |
14 Pilate | |
12 trinque | |
11 vhost- | |
11 uptime | |
11 ben_vulpes | |
9 lykkin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
egrep -B10 '\s*nijotz.*(lol|hah)' irc.freenode.#infoforcefeed.weechatlog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "FastLED.h" | |
// DiscoStrobe | |
// *Flashing* rainbow lights that zoom back and forth to a beat. | |
// See your doctor before using this code if you have certain neurological conditions. | |
// | |
// Mark Kriegsman, July 2015 | |
#if FASTLED_VERSION < 3001000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python: stdout/stderr (slack): Traceback (most recent call last): | |
python: stdout/stderr (slack): File "/home/nick/.weechat/python/wee_slack.py", line 133, in wrapper | |
python: stdout/stderr (slack): return f(data, current_buffer, *args, **kwargs) | |
python: stdout/stderr (slack): File "/home/nick/.weechat/python/wee_slack.py", line 144, in wrapper | |
python: stdout/stderr (slack): return f(*decode_from_utf8(args), **decode_from_utf8(kwargs)) | |
python: stdout/stderr (slack): File "/home/nick/.weechat/python/wee_slack.py", line 3868, in command_thread | |
python: stdout/stderr (slack): msg = get_msg_from_id(channel, args) | |
python: stdout/stderr (slack): File "/home/nick/.weechat/python/wee_slack.py", line 3854, in get_msg_from_id | |
python: stdout/stderr (slack): return channel.hashed_messages.get(msg_id) | |
python: stdout/stderr (slack): AttributeError: 'SlackTeam' object has no attribute 'hashed_messages' |