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
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 |
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 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)) |
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
#!/usr/bin/env swift | |
import Foundation | |
extension Int { | |
var tabs: String { | |
return Array(count: self, repeatedValue: " ").joinWithSeparator("") | |
} | |
} |
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
#!/usr/bin/env swift | |
import Foundation | |
infix operator <*> { | |
associativity left | |
precedence 120 | |
} | |
func <*> <T: CollectionType, U: CollectionType, V where T.Generator.Element == ((U.Generator.Element) -> V)>(left: T, right: U) -> [V] { |
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 <stdint.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
void usage(const char* name) { | |
printf("Usage: %s [int code]\n", name); | |
exit(1); | |
} | |
void doInterrupt(uint8_t code) { |
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
template<typename T, typename U> | |
struct std::hash<std::pair<T, U>> { | |
std::size_t operator()(std::pair<T, U> const& value) const { | |
std::size_t thash = std::hash<T>{}(value.first); | |
std::size_t uhash = std::hash<U>{}(value.second); | |
// See boost::hash_combine for this | |
return uhash ^ ( thash << 1 ); | |
} | |
}; |
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
template<typename T> | |
struct remove_ownership { | |
using type = T; | |
}; | |
template<typename T> | |
struct remove_ownership<__strong T> { | |
using type = T; | |
}; |
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
func +(a: NSAttributedString, b: NSAttributedString) -> NSAttributedString { | |
let muty = NSMutableAttributedString(attributedString: a) | |
muty.appendAttributedString(b) | |
return muty | |
} | |
extension String: CustomPlaygroundQuickLookable { | |
public func customPlaygroundQuickLook() -> PlaygroundQuickLook { | |
let colors: [UIColor] = [ | |
.redColor(), .orangeColor(), .yellowColor(), |
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
'use strict'; | |
/** | |
* MAC OSX ONLY | |
*/ | |
// npm install request async | |
try{ | |
var request = require('request'); | |
var async = require('async'); | |
var Notification = require('node-notifier'); |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>im.danz.dot-clipboard</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/usr/local/bin/node</string> | |
<string>/usr/local/bin/dot-clipboard</string> |
NewerOlder