I'm writing a framework to write HDF5 files that are compatible with Octave.
That is, I want that my framework will be able to read HDF5 files that were written by Octave and in a way that Octave will be able to read HDF5 files written by my framework.
I'm using HDF-JAVA, to read and write HDF5 files.
The problem is that Octave cannot read HDF files that I write in java.
When I try to read such file, I get an error:
d=load('check.h5')
error: value on right hand side of assignment is undefined
From the documentation for load in Octave-Forge:
HDF5 load and save are not available, as this Octave executable was not linked with the HDF5 library.
Is this the problem you are trying to solve with your framework? Or is it the problem that is preventing you from implementing your framework?
That is not the problem. If I create an HDF file that contains only datasets the load works.
(The parameter -hdf5 is not mandatory, Octave can recognize the file type - I tried it).
The problem is that I cannot use only datasets because my framework demand usage of groups(for example cell array of matrixes - for that I must use groups - as Ocave does).
If i'm using groups then the problems start - loading of file that contains groups failes.
Related
I have TCL based project in Linux env, where TCL scripts are used to create the project, run and perform error analysis. Once the run is complete, a set of algorithms (in txt format) are fed back to the flow for error correction.
To hide the txt files, I need to obfuscate/wrap them for delivery to the customer so as not to reveal the algorithms in the files. Please could someone suggest any utility/tool that can obfuscate/wrap and interface the txt files to the project flow so that TCL can read the files automatically without user intervention?
One of many ways is using tools to make a stand-alone executable, for example freewrap utility:
http://freewrap.sourceforge.net/
It's regularly updated and really modern and easy to use in Linux and Windows.
I know there is pyarrow.parquet for reading parquet files as arrow table but i'm looking for the equivalent for avro?
Not yet there are plans for one, the first step is the c++ implementation which hasn't been started yet.
I want to run a trained caffe model in android. I was planning to use the AICamera example by caffe and then modify it to run my model. I was able to compile and build the project.
Currently i have the caffe model definition as a prototxt file and the pretrained model as a .caffemodel file. But the AICamera is using squeeze_init_net.pb file and squeeze_predict_net.pb file for reading models. So how can i convert the files i have to .pb files?
The AICamera sample that you linked is for Caffe2, which is not backward compatible with Caffe.
In Caffe2 Model Zoo page they talk about it:
Compatibility:
Caffe2 utilizes a newer format, usually found in the
protobuf .pb file format, so original .caffemodel files will require
conversion.
In the same page, they link to the Migration page where they explain how to convert the older .caffemodel to the .pb file format.
Basically, they provide a python script to convert your old format to the newer one. Also, there is a test script.
If you want to run your .caffemodel, there are 2 ways (that I know of):
Convert it to the newer .pb file format
Load your .caffemodel with the help of OpenCV
I need to convert many files from .lwo format to .obj or .stl. I have too many to convert "by hand", meaning I don't want to use online tools or import/export the files one by one in Blender or similar.
So I'm trying to do so with a program that would load up each file, convert, then save a new stl . The files are numbered "file000001", "file000002", etc. to make importing easier.
Is there any program out there that will do this? If not, how would I go about accomplishing my goal?
As far as languages go, I am most effective with Processing/Java. I found this which might be similar but doesn't relate to LWOs.
Thanks for any help.
I just found assimp which has a command line tool to convert different file types. Thanks everyone who answered!
I'm sure you can find a few editors that import .lwo and export .obj
For example, Wings3D does that and free/opensource/lightweight.
Wings is scriptable using erlang.
Blender has LWO importer too, but it's not enabled by default. you need to go to Preferences > Addons and enable it there:
Blender has a Python API which should be easy to pickup.
This would allow you to write a script that does a batch conversion (reads a directory, traverses files, imports .lwo, transforms (scales/rotates if needed), exports .obj)
Perhaps if you search enough maybe there is a 3d file format batch converter already out there and .lwo/.obj are old enough formats so might be likely to be supported.
If you want to implement something from scratch, you need to look into each file format (e.g. lightwave object, obj ) to be able to parse and export.
Hopefully there's a java library that for you. I'd start with a 3D java game engine. For example here's a java .LWO importer found via JMonkey.
I have created a separate include files for general purpose uses in my assembly programs. (such as string operations / formatted input/etc.)
When i include those files i notice all of the functions get included in the target binary file.
Is there way I can manage to include only the used functions(like using include files in C/C++ library files)?
I'm using MASM and targeting x86.
To extract separate functions from an object file, the linker needs to know where each one starts and where it ends. It can't reliably tell that from the assembly, so you need to help it.
A common way is to put each function into a separate file and assemble them like that; this way the linker can include or exclude each object file independently. This is the simplest way and works with most assemblers, not just MASM, so I'd recommend trying it.
Another way could be to put each function into a separate segment; the MS linker can exclude unused segments but only if they're marked as so-called "COMDAT" (communal data). Unfortunately, MASM does not support setting this attribute.
There have been some work on adding this info to the OBJ file as a post-processing step, but unfortunately the archive with the tool seems to be gone from the Internet:
Function level linking with MASM
Additional links:
How to achieve "function level linking" with MASM? (includes a tool for semi-automated splitting into several files).
flat assembler - COMDAT support
MSDN forums - Comdat
JWASM:
Support for COFF COMDATs
The last link mentions "Support for COMDAT is added in jwasm v2.10."