Task 7.1 & 7.2

kundan singh
3 min readJun 25, 2021

--

⚙️ Task 7.1 -

📌 In this task you have to create a Web Application for Docker (one of the great Containerization Tool which provides the user Platform as a Service (PaaS)) by showing your own creativity and UI/UX designing skills to make the webportal user friendly.

📌 This app will help the user to run all the docker commands like:

👉docker images

👉docker ps

👉docker run

👉docker rm -f

👉docker exec

👉 add more if you want. (Optional)

👉 Make a blog/article/video explaining this task step by step.

GitHub URL:https://github.com/ksp220798/task-7.git

Here, we have created a simple UI using HTML AND CSS with our async function in JS file which will render the div component when the response is returned without stopping other functionalities.

function lw() {
var i = document.getElementById("input").value;
var xhr = new XMLHttpRequest();
xhr.open("GET", "http://192.168.43.229/cgi-bin/docker.py?cmd=" + i, true);
xhr.send();
xhr.onload = function () {
var output = xhr.responseText;
document.getElementById("d1").innerHTML = output;
};
}

The XMLHttpRequest object can be used to request data from a web server.

XMLHttpRequest (XHR) objects are used to interact with servers. You can retrieve data from a URL without having to do a full page refresh. This enables a Web page to update just part of a page without disrupting what the user is doing. XMLHttpRequest is used heavily in AJAX programming.

Task 7.2 -

📌 Write a blog explaining the usecase of javascript in any of your favorite industries.

Pros and cons of using JavaScript for machine learning

The fact that TensorFlow.js runs within the browser opens up a range of exciting possibilities for businesses and developers alike.

As browsers are an interactive space: one that offers access to various sensors — including webcams and microphones — which can provide visuals and sounds as an input into any machine learning model.

That said, the JavaScript library is only v1.0, and it still has significant limitations. So what are the current pros and cons of using TensorFlow.js in machine learning?

Pros of TensorFlow.js

Popularity

The first positive signal: developers who use it love TensorFlow.js. And adulation typically points to utility, so it’s safe to say the library offers a valuable addition to the world of machine learning.

Moreover, given its a companion to the popular Python library, there’s a low entry threshold — making it simpler for developers to start using it.

Performance

The language itself has high computational performance. It’s hardware-accelerated, as it uses WebGL (a JavaScript graphics API). Plus, if an end-user has a GPU in their system, developers can leverage that to enhance performance further.

Security

Web-scripting languages can open potential vulnerabilities. However, TensorFlow.js has built a reputation for the security of its execution environment, ensuring devices remain protected against threats when running an application.

Range

TensorFlow.js has already proven its value in several use cases on multiple devices: be it in JavaScript applications that run in the browser; on servers inside a Node.js environment; on the desktop; even in mobile browsers on Android and iOS devices.

Cons of TensorFlow.js

Data Limitations

Despite all the positives, TensorFlow.js does not have default access to the file system in the browser host environment. This limits available data resources and can put restrictions on file sizes.

Hardware Acceleration

The framework also has limited support for hardware acceleration. That said, as the open-source language evolves beyond v1.0, this situation is rapidly improving.

Single-threaded

In the JavaScript library, single threads download synchronously, which might throttle performance. Developers can overcome this by yielding the main thread, say, to improve the responsiveness of a page during training.

Thank you

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

No responses yet

Write a response