Recently, I published a small example project to utilize the htm.core AI algorithm by consuming its REST API via C#. As the API also transfers serialized multi-dimensional NumPy arrays, I was looking for an easy way to get them back into C# objects. I’ve tried out a couple of approaches and finally decided on using the NumSharp library, as I wanted a solution that works on multiple platforms.
In case you weren’t aware, htm.core now also provides a REST interface to it’s Network API. With this in place, it is possible to utilize the built-in encoders, Spatial Pooler and Temporal Memory from almost any programming language. In this post I briefly want to touch on how to use htm.core and C# together.
Before you can start playing around with the REST interface, you will need to have the example REST server running.
To do that, you can either
- download the source and build it yourself. Once built, the server executable (rest_server) should
I am really honored by the fact, that a lot of people seem to use my .NET for Apache Spark docker image to explore how C# and Apache Spark can work together, for example.
Additionally, I am getting a lot of request lately, asking whether I would be willing to share the code for creating the images.
And finally, after tidying it up a bit (e.g. removing the experimental Windows support), it is now available on GitHub.
So thanks to everyone who made this image such a success and of course you are very welcome to … more
If you are interested, check out the official resources, or one of the following articles.
- .NET for Apache Spark ForeachWriter & PostgreSQL
- .NET for Apache Spark – VSCode with Docker on Linux and df.Collect()
- Happy New Year & the answer to the Christmas puzzle
- .NET for Apache Spark – UDF, VS2019, Docker for Windows and a Christmas Puzzle
- Debug .NET for Apache Spark with Visual Studio and docker
A couple of months ago I’ve described how to transfer data from Apache Spark to PostgreSQL by creating a Spark ForeachWriter in Scala.
This time I will show how this can be done in C#, by creating a ForeachWriter for .NET for Apache Spark.
To create a custom ForeachWriter, one needs to provide an implementation of the IForeachWriter interface, which is supported from version 0.9.0 onward. I am going to use version 0.10.0 in this article, however.
Documentation of the C# Interface is provided within the related source code:
The example project I am … more