protocol-buffers

Is there any way to access Protocol Buffers with python 3.x?

只谈情不闲聊 提交于 2019-12-03 01:22:53
We use Python 3.x in our projects. But the official client of Protocol Buffers only supports python 2.x. I don't want to downgrade to python 2.x. UPDATE 2 : Python 3.x is natively supported as of version 3.0.0. You can see versions released on GitHub here: https://github.com/protocolbuffers/protobuf/releases UPDATE : The stable version of protobuf, 2.6.1, does not support Python 3.x. However, the newer 3.0.0 release (still in beta) supports Python 3.x. You can see versions released on PyPi here: https://pypi.python.org/pypi/protobuf No, there isn't. There is a discussion on the protobuf google

How does protobuf-net achieve respectable performance?

大憨熊 提交于 2019-12-03 01:21:43
问题 I want to understand why the protocol buffers solution for .NET developed by Marc Gravell is as fast as it is. I can understand how the original Google solution achieved its performance: it pre-generates optimized code for object serialization; I've written some serialization by hand and know that it is possible to write pretty fast code this way if you avoid reflection. But Marc's library is a runtime solution that uses attributes and doesn't produce any generated code. So how does it work ?

Why isn't Hadoop implemented using MPI?

南楼画角 提交于 2019-12-03 00:54:50
问题 Correct me if I'm wrong, but my understanding is that Hadoop does not use MPI for communication between different nodes. What are the technical reasons for this? I could hazard a few guesses, but I do not know enough of how MPI is implemented "under the hood" to know whether or not I'm right. Come to think of it, I'm not entirely familiar with Hadoop's internals either. I understand the framework at a conceptual level (map/combine/shuffle/reduce and how that works at a high level) but I don't

Serialize C++ object to send via sockets to Python - best approach?

时光怂恿深爱的人放手 提交于 2019-12-03 00:38:07
I need to create a network communication between two different frameworks, one written in C++ and the other in Python . To exchange data, I want to create some kind of flexible structure (basically a struct) in C++ , which is serialised, sent through sockets to Python and then deserialised. What is the most common way to do this? I'm sure that Boost could do it on either side, since there is boost python , but I don't want to blow up the project requirements that much. So is there maybe a smaller library or whatever another elegant solution except specifying an own binary data format? UPDATE:

protobuf-net v2 and Monotouch : How does it mix?

十年热恋 提交于 2019-12-03 00:29:09
I have been trying to use protobuf-net with MonoTouch but I have no idea how, and despite having heard that it is possible, I haven't been able to find any tutorial or any example that actually work. It was confirmed by Marc Gravell on his blog that it does work on MonoTouch. I have also looked through the blogs of the two people he states in this article, but I haven't found anything related to protobuf. Having no lead on the subject, i decided to download protobuf-net and try it out anyway. So I created the following object for testing purposes : [ProtoContract] public class ProtoObject {

C++ Protobuf to/from JSON conversion [closed]

社会主义新天地 提交于 2019-12-02 22:45:21
Closed. This question is off-topic. It is not currently accepting answers. Learn more . Want to improve this question? Update the question so it's on-topic for Stack Overflow. Is anyone familiar with a stable C++ solution (library, code snippet etc.) which converts protobuf messages to/from JSON? This one is better IMO: https://github.com/shramov/json2pb it does conversion in both directions and handles extensions I've made a bootstrap implementation of a JSON parser for protobuf generated types, using the its reflection mechanism, and adapting the parse I've made previously for CORBA IDL

Convert Keras model to TensorFlow protobuf

无人久伴 提交于 2019-12-02 22:26:15
We're currently training various neural networks using Keras, which is ideal because it has a nice interface and is relatively easy to use, but we'd like to be able to apply them in our production environment. Unfortunately the production environment is C++, so our plan is to: Use the TensorFlow backend to save the model to a protobuf Link our production code to TensorFlow, and then load in the protobuf Unfortunately I don't know how to access the TensorFlow saving utilities from Keras, which normally saves to HDF5 and JSON. How do I save to protobuf? In case you don't need to utilize a GPU in

ImportError: No module named google.protobuf

你说的曾经没有我的故事 提交于 2019-12-02 21:48:38
I am following this guide ( https://developers.google.com/protocol-buffers/docs/pythontutorial ) and using the exact sample of addressbook.proto. Post the content of compiler generated addressbook_pb2.py file as well. When I run the following simple program, there is error saying, cannot find google.protobuf, any ideas how to resolve this issue? Thanks. BTW, using Python 2.7 on Mac OSX. from addressbook_pb2 import Person p = Person() p.email = "abc" print p.email Here is the automated generated file addressbook_pb2.py, # Generated by the protocol buffer compiler. DO NOT EDIT! # source:

How to decode binary/raw google protobuf data

徘徊边缘 提交于 2019-12-02 20:49:07
I have a coredump with encoded protobuf data and I want to decode this data and see the content. I have the .proto file which defines this message in raw protocol buffer. My proto file looks like this: $ cat my.proto message header { required uint32 u1 = 1; required uint32 u2 = 2; optional uint32 u3 = 3 [default=0]; optional bool b1 = 4 [default=true]; optional string s1 = 5; optional uint32 u4 = 6; optional uint32 u5 = 7; optional string s2 = 9; optional string s3 = 10; optional uint32 u6 = 8; } And protoc version: $ protoc --version libprotoc 2.3.0 I have tried the following: Dump the raw

Eclipse plugin for working with protobuf

試著忘記壹切 提交于 2019-12-02 20:44:18
Protocol Buffers (protobuf) are a way of encoding structured data in an efficient yet extensible format. There's plugin for Netbeans, but I cannot find one for Eclipse. Does it exist? If yes, please, share the link. Thanks. unBrice I recommend using Google's "Protocol Buffers Development Tools". It is a plugin for Eclipse that features automagic regeneration and error checking with quick fixes, among other things. It's available here: https://github.com/google/protobuf-dt/blob/master/README.md . It does not seem to be approved by Eclipse yet . And the EMF project uses protobuf , but not as a