Skip to content

Instantly share code, notes, and snippets.

@danzimm
danzimm / cowsay.py
Created April 17, 2017 05:30
Weechat cowsay plugin
import os
import subprocess
import weechat
rawCowfiles = subprocess.check_output("cowsay -l", shell=True)
cowfiles = [f for line in filter(lambda line: not line.startswith("Cow files in"), rawCowfiles.splitlines()) for f in line.split()]
ordCowfiles = "||".join(cowfiles)
weechat.prnt("", "Available cowfiles: " + str(cowfiles))
@danzimm
danzimm / Output.txt
Created May 17, 2017 15:33
Example output of caffe2 receiving a given signal in c++
SIGABRT(6), Thread 3493194:
[0] ???+0x51aad878(0x7f7a51aad878) in /home/danzimm/oss/caffe2/build/caffe2/libCaffe2_CPU.so
[1] ???+0x51aadbbe(0x7f7a51aadbbe) in /home/danzimm/oss/caffe2/build/caffe2/libCaffe2_CPU.so
[2] ???+0x51aade72(0x7f7a51aade72) in /home/danzimm/oss/caffe2/build/caffe2/libCaffe2_CPU.so
[3] ???+0x510ca370(0x7f7a510ca370) in /lib64/libpthread.so.0
[4] raise+0x2b(0x7f7a510ca23b) in /lib64/libpthread.so.0
[5] ???+0x404fcf(0x404fcf) in caffe2/binaries/fatal_signal_test
[6] ???+0x40562d(0x40562d) in caffe2/binaries/fatal_signal_test
[7] fatalSignalTest_SIGABRT8_Test::TestBody()+0x73(0x405773) in caffe2/binaries/fatal_signal_test
[8] void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*)+0x33(0x7f7a5021b203) in /home/danzimm/oss/caffe2/build/third_party/googletest/googlemock/gtest/libgtest.so