Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I have a decent amount of experience with TensorFlow, and I am about to embark on a project which will ultimately culminate in using a TensorFlow trained model in a C# production environment. Essentially, I will have live data which will come into the C# environment, and I will ultimately need to output decisions / take certain actions based on the output of my model in TensorFlow. This is basically just a constraint of the existing infrastructure.
I can think of a couple of potentially bad ways to implement this, such as writing the data to disk and then calling the Python part of the application and then finally reading the result output by the Python application and taking some action based on it. This is slow, however.
Are there faster ways to accomplish this same integrated relationship between C# and the Python-based Tensorflow. I see that there appear to be some ways to do this with C++ and TensorFlow, but what about C#?
This is a prime use case for TensorFlow Serving, which lets you create a C++ process that can run inference on a trained TensorFlow model, and serves inference requests over gRPC. You can write client code in any language that gRPC supports. Take a look at the MNIST tutorial: C++ server and Python client components.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I have one C# application and C application and I want the C# application to send 2 integers to the other 1(c)
What's the easiest way to do this? (It doesn't have to be the most elegant one)
My C# application is hosted on a Ubuntu operating system.
Any help would be greatly appreciated.
If the purpose is only to send the parameters or values to a C function, I can suggest that you consider using P/Invoke. Then you talk about Ubuntu operating system, which suggests you either would be using Mono or .NET Core; consider reading this Native Interoperability — in case of Mono, this would help.
COM and other interops would require that you write C programs in a way that they can expose themselves out to the .NET framework. If writing the libraries as exposed, is not possible (such as precompiled libraries), then you would be able to have this done using named pipes. They are the pipes, which are used for communication within processes.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
The project I am working on will have to be migrated from C# to F# based on what brings food on the table tomorrow - in other words, the two languages have to live side by side in this project for years to come.
The problem I am faced with repeatedly is how I should organize projects in the solution to meet this need.
I translate pieces from C# to F# all the time, because it frequently shortens the development time and increases the quality. But I end up with C# code that wants to use F# code, and F# code that want to use C# code, in the same layer, or at boundaries between layers or modules. I find myself putting code in the wrong projects just to avoid creating yet another project in some layer.
The situation is not bad now, but I worry that I will paint myself into a corner at some point, unless I can come up with a pattern or a structure, or simply understand the problem better.
Is there some modification to a normal F# architecture - a pattern, a substructure or a superstructure - that is well suited to such a mixed solution?
Are there patterns that are known to be especially helpful in solving this particular challenge?
Use an interface to communicate between the two languages.
Typically when porting, f# is the lower-level dll and C# can call f# as usual.
Now for f# to call c# define an interface in the f# dll (e.g. IClibApi) that is implemented in c# (e.g. ConcreteClibApi extends IClibApi). Create an instance of ConcreteClibApi and pass it to f#. Now f# can call c# thru IClibApi.
Later you can start porting ConcreteClibApi :)
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I work for a small Point of Sale Company, and we are working on a in-house tool to make our lives easier when it comes to ticketing and troubleshooting. Part of my task in this tool is to write a 'softphone' in C# WPF that we can use to accept incoming and make ongoing calls with.
We currently use OnSIP as our SIP provider, and are looking to build custom software to essentially allow us to auto-generate support tickets based on the phone number of the incoming call. In addition we will need call transferring, recording, hold/wait, etc.
The question that seems to be causing me the most trouble is really where to begin on something like this. Thoughts?
I'm presuming this is a desktop application?
Lookup pjsip.org, it's a portable C library which is very well proven. It will allow you to do all that you are asking, although it'll take you some time to write the wrapper code - you can find examples on the internet, however we have written a wrapper ourselves which I'll check on as we had intended open sourcing it. This is because when we did this last year, the examples just didn't work too well :-)
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
As Big Data term used widely to manage huge data, I want to give a try to build a small application with Big Data to understand structure and how I can start with ASP.NET technology?
Is it possible?
"Big data" is a marketing term for "highly scalable large load computing". So can you use ASP.NET for highly scalable large load computing...
Yes, and here is how (Scaling Strategies for ASP.NET Applications).
Adding to Scott's answer, apart from ASP.NET being capable of scaling to high loads with effective strategies, .NET ecosystem also provides HDInsight in Azure, which implements MapReduce programming model to query over large clusters of Data.
Azure HDInsight could closely be related to the marketing buzzword of 'Hadoop','Big Data' etc.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'm looking to create a bot like program and I'm looking to use a screen-scraper to retrieve data such as health which is numerical.
I have no idea how to accomplish this as most screen-scrapers are programmed in c++ as directx is most popular within that.
Is it possible to create a well working c# screen scraper for a directx program?
Thanks.
Outside of kernel mode, anything that can be done in C++ can be done in C#.
With that disclaimer out of the way please know that client-side bots don't work by actually screen-scraping and performing OCR. Instead they hook into DirectX's functions and record copies of the string text sent to DrawText, for example, or the vertices in the current world view graph and then work from there.
I've never really gotten into this area of programming so I can't give you any more specific advice, but I can tell you that you're in for an uphill struggle.
The alternative is just to use common Trainer/debugger techniques and map the memory of your target process. I assume you're targeting a game of some description, however said games often feature very heavy cheat-detection and prevention techniques and trying things out on a public server can get you banned for life (e.g. Steam's VAC).