Skip to content

Instantly share code, notes, and snippets.

View BradNeuberg's full-sized avatar

Brad Neuberg BradNeuberg

View GitHub Profile
@BradNeuberg
BradNeuberg / text_format.h
Created July 28, 2015 17:06
text_format.h file from protobufs
bradneuberg: python (master +) cat ../src/google/protobuf/text_format.h
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
@BradNeuberg
BradNeuberg / gist:af3eae21a496b9e95548
Created July 28, 2015 17:04
Symbols in libprotobuf.9.dylib
bradneuberg: python (master +) nm /usr/local/lib/libprotobuf.9.dylib
00000000000a1088 s GCC_except_table0
000000000009f944 s GCC_except_table0
00000000000911fc s GCC_except_table0
000000000009ff60 s GCC_except_table0
000000000009ccf8 s GCC_except_table0
0000000000095f20 s GCC_except_table0
000000000009f2d8 s GCC_except_table0
000000000008ee58 s GCC_except_table0
000000000009b678 s GCC_except_table0
@BradNeuberg
BradNeuberg / output.log
Created July 28, 2015 04:51
Full log of attempting to get Anaconda + Python Protobuf + cpp_implementation optimization + Mac OS X Yosemite working
Last login: Mon Jul 27 21:42:44 on ttys000
bradneuberg: ~
bradneuberg: ~
bradneuberg: ~
bradneuberg: ~ cd /usr/local/protobuf-2.6.1/
bradneuberg: protobuf-2.6.1 (master +)
bradneuberg: protobuf-2.6.1 (master +)
bradneuberg: protobuf-2.6.1 (master +) env | sort
ANACONDA=/Users/bradneuberg/anaconda
Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.tntsyOMak1/Render
def _generate_leveldb(self, file_path, pairs, target, single_data):
"""
Caffe uses the LevelDB format to efficiently load its training and validation data; this method
writes paired out faces in an efficient way into this format.
"""
print "\tGenerating LevelDB file at %s..." % file_path
shutil.rmtree(file_path, ignore_errors=True)
db = leveldb.LevelDB(file_path)
batch = leveldb.WriteBatch()