pickle rpy2 objects in windows - pickle

I'm using rpy2 V2.0.8 with Windows. I'm using rpy2 to for classification and would like to save (pickle) the model (for example the output from glm). However, as far as I know V2.0.8 does not support pickling rpy2 objects (and this is the latest version for Windows).
Do you have any suggestions how can I pickle / save the classification output in a file?
Thanks!

Try one of:
find out why there is no Windows support and do something about it ;-)
contribute windows support
roll out your own solution using R's mechanism for serialization (which is what rpy2 >= 2.1.0 is doing)

Related

Looking for a good Visual C++ 2010 compatible JSON parser that supports JsonPath for windows 32/64 bit platform. Any recommendation?

Have looked at quite a few like the following:
https://rapidjson.org/index.html - Supports VC++ 2010. But, not sure about JsonPATH
https://github.com/danielaparker/jsoncons - Supports JsonPATH. But, not sure about VC++ 2010
The best resource I can think of right now is the JSON Path Comparison project. It groups by language/framework, so finding what you need should be fairly easy.

How to use Haskell tool xml-to-json in terminal?

I am going to use xml-to-json to process a large xml file. I searched several methods, but they did not work due to out of memory. Then I found a tool implemented in Haskell, but when I tried this tool according to the guide, it says command not found. Could anyone please tell me how to use this tool? Thanks in advance. here is the link of the tool: https://github.com/sinelaw/xml-to-json#readme
Update
Screenshot of error
Most probably, your executable is built but isn't in your PATH.
On many systems cabal installs things to $HOME/.local/bin. So you can try adding that to your PATH environment variable.
It looks like you're using a Mac, in which case the path to use is $HOME/Library/Haskell/bin/. This page seems to have relevant instructions on how to configure Mac OS X.

Using DX11 and DXVA2

I am trying to test decoding a h264/h265 video (with just a single iframe) using DX11 and DXVA2. This is on windows 7 so I probably have to interop between 2 d3d11 devices, one with 11.1 feature set and the other with 9.3. My question is since there is a severe lack of samples for loading a h264 file and decoding it using DXVA, I was wondering if there is a guide for how to layout the data to feed into DXVA to decode? I've read this How do I use Hardware accelerated video/H.264 decoding with directx 11 and windows 7? as well as https://msdn.microsoft.com/en-us/library/windows/desktop/hh162912(v=vs.85).aspx but neither has any guide on how to do the above.
Thanks
If you want a working sample to understand how to feed data into DXVA, look here : MFNode. Under MFTDxva2Decoder, you will see how to feed data. It is for mpeg1/2 file format, but the same apply to H264 (with shades, of course).
EDIT
See my response : How do I use Hardware accelerated video/H.264 decoding with directx 11 and windows 7?

Port TensorFlow code to Android

I have written a script for sequence classification using TensorFlow in Python. I would like to port this code to Android. I have seen the example on the TensorFlow github page regarding Android but that is for images.
Is there any way to directly port my TensorFlow Python code on Android?
The typical way to do this is to build (and train) your model using Python, save the GraphDef proto to a file using tf.train.write_graph(), and then write an app using the JNI to call the C++ TensorFlow API (see a complete example here).
When you build your graph in Python, you should take note of the names of the tensors that will represent (i) the input data to be classified, and (ii) the predicted output values. Then you will be able to run a step by feeding a value for (i), and fetching the value for (ii).
One final concern is how to represent the model parameters in your exported graph. There are several ways to do this, including shipping a TensorFlow checkpoint (written by a tf.train.Saver) as part of your app, and running the restore ops to reload it. One method, which has been used in the released InceptionV3 model is to rewrite the graph so that the model parameters are replaced with "Const" nodes, and the model graph becomes self contained.
There is QPython or Kivy.
QPython - Android Apps on GooglePlay. It's a script engine that runs Python on android devices. It lets your android device run Python scripts and projects. It contains the Python interpreter and some other stuff like pip, but there's no compiler available, so only pure-python packages will work.
Python for Android - lets you compile a Python application into an Android APK together with additional packages both pure-python and those that need compiling.

XMIDI file format

I am going to write a converter from Miles Sound System Extended MIDI to standard MIDI file, but I am unable to find any good documentation on this format. There is a DOS converter at http://www.hitsquad.com/smm/programs/xmi2mid/, but it is useless on 64-bit platforms and there aren't any sources of this program. There is also John Miles' website http://www.ke5fx.com/ where older AIL Version 2 is, but my C and assembly language capabilities aren't good enough to understand it. I have found a converter in Java at http://de.glibly.de/?site=software&lang=eng, but it has strange tempo issues and I haven't found a way to fix it yet. Could you point me to some documentation or a working converter with sources, preferably in C#?
The only completely working converter I've found so far is the in_midi.dll plugin of WinAmp.