Is it possible to use pandoc from google app engine? - google-app-engine

I'd like to generate some reports from my python webapp - I set it up locally via PyPandoc.
However, I can't find PyPandoc on the list of available libraries. I tried vendoring it into my libs folder and using pypandoc's pypandoc.pandoc_download to download the pandoc binary, but that only works for 64-bit processors apparently.
Is there a way to request 64-bit environment? Or some way to get pandoc installed on the machine?

In a standard environment GAE app you neet to meet the python sandbox restrictions, one of which is using pure python code, which pandoc doesn't meet. From Pure Python:
All code for the Python runtime environment must be pure Python, and
not include any C extensions or other code that must be compiled.
You might be able to use it in a flexible environment GAE app, eventually using a custom environment, but I'm not 100% sure - I didn't use it yet.

Related

Is there a way to import a behavior at a Nao Roboter (Python SDK)

I use the NaoQI SDK for Python.
I also use Choregraphe sometimes but I feel like I can do much more with pure Python code.
Is there a way to load in the Behaviors that are included in the Choregraphe (the dances etc.)? I already found the .xar files for the Behaviors but I have no clue how to load them into my Python code.
It's possible to launch behavior or boxes from python code, using ALBehaviorManager or ALFrameManager (a lower level API).
Have a look at these modules' API:
http://doc.aldebaran.com/2-5/naoqi/core/albehaviormanager.html
or also http://ii.tudelft.nl/naodoc/site_en/bluedoc/ALFrameManager.html

Cross-compiling Azure IoT SDK for C

I have successfully managed to cross-compile the C Azure IoT SDK for a target device running embedded Linux. The instructions are here : https://github.com/Azure/azure-iot-sdk-c/blob/master/doc/SDK_cross_compile_example.md
The next step is to get a basic application using the SDK running on the target device.
How would one go about doing this? Where are the generated libraries etc. to copy to the sysroot of the target device.
There seems to be only support for Rasberry Pi and generating a new firmware image.
I would recommend that you use the -DCMAKE_INSTALL_PREFIX=[output path] when you generate your makefiles. Once you have run cmake and make you can then run make install which will copy the generated libraries to the location you chose. You do NOT want to install them into your host's library search path since (presumably) they are built for an incompatible architecture. Having done that the /lib directory will have the libraries that you need to use to build your application. These are static libraries (unless you chose otherwise) so they only need to be linked to your application. They do not need to be on the device. Obviously you will also need to cross compile your application.
There are a couple of things you need to look out for though. Your device will need to have the same version of OpenSSL and curl that you used when you built the SDK. These are dynamic libraries so your application would likely fail at run time if you don't take care of that since there would be a version mismatch.
There is another example of cross-compiling here: https://github.com/Azure/azure-iot-sdk-c/blob/master/doc/Docker_SDK_Cross_Compile.md. This version also builds the prerequisite libraries and has suggestions about how you might also cross compile your application. It uses a Docker container to do this but, even if you don't want to use Docker, it may still help you with your process.

Running Node.js on STM32

Iam working yet with C program on STM32 microproc, what contains a web server, accesible by the user via web gui(HTML and javascript files). The web gui part became more complex, and it needs higher level operations.
The questions: is it possible to embed a node.js program with some node modules? Does it work with the C webserver, or the node program have to make the webserver, and communicate with the C program?
Or there is an other solution what is better in this case?
This question maybe seems dumb, but i didnt find documentation about it.
After a research I found some solutions:
Node.js for Embedded Systems
The book can then guide you to jerryscript which:
is a lightweight JavaScript engine for resource-constrained devices
such as microcontrollers
You can find there that it's also used with the STM32-Discovery board.
Node.js on clientside
This article guides to Browserify which allows to run node on clientside.
Just make it simpler
You could use HTTPD implementation shipped with LwIP. There is a script called makefsdata which allows to convert html, js, css ... files into c-arrays. This implementation also supports POST method.

Can I create a GAE app that runs an uploaded file through a couple binaries and sends it back?

I have a Python script that I'd like to share with some colleagues, however they don't have Python installed (or at least not the right version) as well as some additional scientific software.
I was curious if I could use this fairly basic script which gives a file to one binary in my scientific package, massages the data in the script, then provides it to another binary as an opportunity to learn GAE. Am I mistaken, however, because I couldn't run these binaries on GAE, precluding the whole thing?
If I'm understanding your question right, you have a bunch of binaries that do some scientific processing, and a python script that takes input, and routes it through the science programs.
If your science binaries are jar files, it may be doable with GAE. Although you can't run python and Java on the same instance, there are ways to work around it with a python instance and a separate Java instance.
If your binaries are native code, then no, can't be done with GAE. There's other providers like AWS that give you access to the OS on the VM. You can probably do it there.

Lua on Google App Engine

Is it possible to use Lua with Google App Engine? I recognize that there will be a lot of Java glue, but I would like to use Lua for most of the logic.
It might be possible with a port of Lua such as Kahlua or Jill (Lua implemented in Java). The Lua Users Wiki page on Lua Implementations does not show any ports written in Python.
But you wouldn't be able to use "vanilla" Lua because that is written in C; as you're probably aware, GAE only allows Java and Python code.
I haven't used it, but Lunatic Python purports to be a way to run Lua in Python or vice versa. If that's true, then you could use their tools to create a Lua interpreter running in a Python app running on Google App Engine. Sounds promising.

Resources