I'm currently working on a project which allows me to generate complex terrains. I'm taking inspiration from the following article:
https://hal.archives-ouvertes.fr/hal-02326472/file/2019-orometry.pdf
I have contacted the authors of the project and I am allowed to use their code and modify it so that's not the problem. As the code is quite complex and uses a lot of python packages (such as numpy), I don't want to completely recode the project in the language I'm currently working with (Kotlin)
Is there any way I can use/modify the code of the project and use it as a service so that I can interact with it using a REST Api (the code would be hosted by a third-party like Heroku or something in the likes of that)? I'm not that experienced using/programming these sort of infrastructures and I don't really know where to start, so any help is appreciated.
Related
Ok I was doing some data science in python over the weekend and I got to looking at python for mobile development. I was curious as to if it's possible to use both Python (back-end) and use Kotlin (front-end) together?
I know python is a non GUI unless you use kivy or flask. However I was thinking if it's possible can you cross python and Kotlin together.
There is a lot apps that use python as the backend, and another language for the front end. I have done some research and found that Kivy (unstable from my research) can be used for mobile development. However for Android Kotlin is the preferred choice by Google.
Which throws me off because Google uses python for the backend. So when you look at the Google Apps on the Play Store, are they using python and java in mobile apps?
The app I am planning which will be released to Google Play on my developer page will be a Data Driven app. So things would go much smoother if I could combine the two.
Has anyone tried using python and Kotlin? However, would I be stuck with Python and Kivy?
The language used to program frontend vs backend don't matter, the only thing that matters is how the two communicate (assuming when you say backend you mean like a server and not like a game engine). Traditionally, applications will communicate with a backend using a REST API. So long as both sides abide by the same rules for talking to each other, it doesn't matter what language they were programmed in, known as a communication protocol.
The situation that you presented of a Kotlin frontend with a Python backend is definitely being used in production environments, and you shouldn't be afraid to do so either.
See also this related question, though I personally wouldn't recommend using Python to write an Android application because I believe natively supported first-class languages are going to produce more performant, reliable apps than non-native second/third-class languages (I haven't done more than find that SO question, so take my opinion with a grain of salt)
I was studying about DApps and I found most of them are written using Solidity and JS. Also, I found that there's a web3.py library for people who love python (and I didn't search for the same thing in ruby programming language). But, I have a question, is there any decentralized system like heroku? I mean, writing a piece of code (e.g. Sinatra/Flask based API) and then deploy on that network?
Regards.
I think that you're asking: is there an application that will let me build applications and deploy them to the network?
You might take a look at Truffle. You can develop and deploy applications in Javascript.
However, if you like Python (like I do), I just released an open source tool called Ezo. It's in alpha, so patience please. :) It's a command-line tool for building off-chain event responders (or oracles) for Ethereum. Here's an article on how to use it.
You'll also want to download and install Ganache to simulate a working Ethereum EVM. You'll likely lean on it a lot during any development you may do. Good luck.
I am learning about sandbox,and I would like to make one sandbox,
All I know about the sandbox is it is a platform to run untrusted codes with giving restricted access to resources to that code in order to protect our system from getting harmed due to that untrusted code,
i tried searching google but i did not get a satisfactory answers,
so what i would like know from all of you is where to start learning for sandbox,
my language of preference to code the sandbox will be python.
Browsers provide a good sandbox that allows users to run code in mostly javascript. If you really want to use python then you can look for a javascript python interpreter.
If you want to give users complete access to a computers resources while keeping them in a sandbox then you will need to look into virtualization.
I have developed a few python programs that I want to make available online.
I am new to web services, and I am not sure what I need to do in order to create a service where somebody makes a request to an URL (for example), and the URL triggers a Python program that displays something in the user's browser, or a set of inputs are given to the program via browser, and then python does whatver it is supposed to do.
I was playing with the google app engine, which runs fine with the tutorial, and was planning to use it becuase it looks easy, but the problem with GAE is that it does not work well (or does not work at all) with some libraries that I plan to use.
I guess what I am trying to do is some sort of API using my WebFaction account.
Can anybody point me in the right directions? What choices do I have in WebFaction? What are the easiest tools available?
Thank you very much for your help in advance.
Cheers
Well, your question is a little bit generic, but here are a few pointers/tips:
Webfaction allows you to install pretty much anything you want (you need to compile it / or ask the admins to install some CentOS package for you).
They provide some default Apache server with mod_wsgi, so you can run web2py, Django or any other wsgi frameworks.
Most popular Python web frameworks have available installers in Webfaction (web2py, django...), so I would recommend you to go with one of them.
I would also install supervisord to keep your service running after some reboot/crash/problem.
I would be glad to help you if you have any specific question...
I am planning to do a small web application that will be distributed as a single installable. I have plans to develop this application in either Python/Django or Ruby On Rails. (I am a Java/C++ programmer, hence both these languages are new to me).
My main concern is about the size and simplicity of final installable (say setup.exe). I want it to be small in size and also should be able to pack all required components in it.
Which one among Python/Django and Ruby On Rails is suitable for me?
I personally prefer Python/django. Size is small given u have necessary things installed.
With disk space at the current price, size shouldn't matter. Give both a try and figure out which will be easier for you to learn and maintain. Despite the fact that people believe that when you know one language, you know all, that's only true as long as you write code on the "hello world" level.
One option with Ruby on Rails is to go with a JRuby deployment which would allow you to pack it all into a single .war file. This would require the person deploying the web application to have a java web application server (Jetty is probably the smallest and easiest to bundle).
With Rails, you are generally going to have to install Ruby and any required ruby gems. The Ruby install is going to be machine specific- different for Windows/Linux. Everything else should be easily scripted. If you go with an Apache Passenger (mod_ruby) solution, you will need to get that installed as well.
In reality, I haven't run into many server applications with simple, compact installs.
I just used heroku to deploy a blog written in Rails, and it was a fantastically easy experience. If you're interested in simplicity, it's probably the most simple deploy I've ever experienced.
I don't think you can get them both. I'm sorry to say this but you have to choose which one is more important to you.
Django application is smaller in size because many things is already provided out of the box, but deployment is not as easy.
On the other hand, RoR apps deployment is easier (both Ruby MRI or JRuby) but the application's size is naturally larger given you have to install other gems and Ruby On Rails plugins.
If you are experienced with Java and concerned about deploying Django and Rails apps, I'd recommend you give JRuby a try. This will give you several benefits from a Java-perpective:
You can call Java-classes and components from your Ruby/Rails app
You can use a familiar IDE such as Netbeans
You can package and deploy our entire Rails app as a single WAR-file with all dependencies included
With the cheeseshop, any python application can be made installable with a single command. I'm a big fan of Django, but it will require you to hook into an external webserver, as the built in server is for development only. You might look for something that has a more robust builtin web server if you want something you can just plunk down and start running. Twisted might meet your needs, though there's a bit more of a learning curve on that. I'm not sure how other python or ruby apps stand up on this front.