teleren/devto huggingface dataset:
Running ML Model in Docker Container
Published: 2021-05-26 14:09:43

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wwdhk1629gpvbjiaiut6.jpg)

What is Machine Learning?
Machine learning is the study of computer algorithms that improve automatically through experience and by the use of data. It is seen as a part of artificial intelligence.

What is Docker ?
Docker is a set of platform as a service products that use OS-level virtualization to deliver software in packages called containers. Containers are isolated from one another and bundle their own software, libraries and configuration files; they can communicate with each other through well-defined channels.

How to Install Docker?
 yum install docker-ce


How to Check if the docker is running ?
 systemctl status docker
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mw30keyyhi7pgm0c9bsk.png)

Downloading Centos:Latest Image from Docker HUB:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/unqum18jv6i0k56kbspv.png)

Lauching a new Centos Container :
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hwlvw2s99p0qorvtxisy.png)

Installing Required Packages :
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tm8unnagn83he3awhhqp.png)
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lzs28jl47vuyzhyfpkal.png)

Writing Code for our Machine Learning Model :
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xgq36j7bg5jprq2umknp.png)

The Output of our Machine Learning Model : 
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qxo2dh5z4bfsop4oppar.png)

Thanks!!
Transferring data across docker or podman volumes
Tags: docker, python, devops
Published: 2021-05-26 14:05:30

I often find myself starting temporary containers to transfer data between the local file-system and container volumes. Or sometimes, between volumes. And the entire process is a bit tedious. Starting a temporary container, mounting the volume, mounting the local file-system, and finally transferring the data.

So I made a python script which makes this easy. I call it `cvcp` - container volume cp (copy). It actually does not use `cp` though. It uses `rsync` for the data transfer. So it's necessary to have a container image with `rsync` installed.

You can find the script at https://github.com/jeet-parekh/cvcp. The repository also contains a `Dockerfile` which will build an image with `rsync` installed.

---

## Using cvcp

Download the file `cvcp` from the repository and place it inside your preferred path. I prefer `~/bin`.

Then, to use `cvcp`:

```bash
cvcp SOURCE DESTINATION
```

Path inside a container volume should be written as `<volume_name>:<path_inside_volume>`.

Either `SOURCE` or `DESTINATION` can be a local path or a path inside a container volume. Note however that both `SOURCE` and `DESTINATION` cannot be local paths.

If you use `cvcp` without any options, it will pull a `rsync` image from Docker Hub, and will use docker with root (`sudo docker`).

The following command line options are available to customise the behaviour:

- `--docker` and `--podman`
  - The container engine to use.
  - The default is `docker`.

- `--rootless`
  - Use the container engine without root (without `sudo`).

- `--image`
  - The container image to be used.
  - Note that the image needs to have `rsync` installed. Read the next section for more details.

- `--rsync-opts`
  - Options to pass to `rsync`.
  - Note that, you need to pass all the options as a quoted string **with a space at the beginning**. For example, `' --verbose'`.
  - Using this option will clear the default `rsync` options used by `cvcp`, so make sure to pass all the options required.
  - The default options are `' -a --progress'`.

- `--no-exec`
  - Print the command and exit.

---

## Using a custom image

To use a custom image with `cvcp`, use the `--image` argument.

To permanently change the default image that `cvcp` uses, change this line in the `cvcp` script file:

```python
RSYNC_IMAGE = "image_name"
```

It is necessary for your custom image to have `rsync` installed. You can use the Dockerfile inside the same repository as a base to build the image.

```bash
# docker
sudo docker build -t localhost/rsync .

# podman
podman build -t localhost/rsync .
```
Starting Publish Articles on Data Science 
Tags: datascience, python, machinelearning
Published: 2021-05-26 14:03:08

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2epmown3apbdw1fiq49d.JPG)

### Announcement : From this post I am starting series related Data Science.
I am starting learning path program of Data science from [codecademy](https://www.codecademy.com/paths/data-science).

New Post Coming Soon...
Dart Vs JavaScript- A Comparison That You Must Know

Tags: dart, javascript, android
Published: 2021-05-26 14:00:08

Javascript gained popularity when it came in the world of cross platform mobile app development and server-side development. Node.js framework can be used for both frontend and backend development, so it became more popular among web developers. With the use of React native by facebook, mobile app developers also started to shift towards Javascript. So javascript is holding the position of most popular programming language. Google created the Flutter framework for cross-platform mobile application development. Flutter framework uses Dart programming language. Most of you might have a question of what’s the difference between dart and javascript. How do they differ? To know the answer to all this, let us see the comparison of Dart vs javascript.

#What Is Dart?
Dart is a programming language used by Flutter framework. It was initially used at Google to build server, web and mobile applications. Dart compiles the source code like javascript. It gained more attention in 2017 when google announced Flutter beta for cross platform mobile app development. These days developers are eager to adopt Flutter, but they nee dto learn Dart to get started.

#Advantages Of Dart-
* Dart is open-source
* It is supported by Google and runs seamlessly on Google Cloud platform
* Faster than Javascript
* It is type-safe and compiled with both AOT and JIT compilers
* Dart is scalable across projects
* Extensively used for flutter mobile UI framework

#What Is Javascript?
Javascript is a language for rendering web pages along with HTML and CSS technologies. Later on, javascript extended its arm to server-side and mobile app development. Javascript is a mature, stable programming language and supports both OOPS and functional programming style. Because of the dynamic nature, it doesn’t need compilation of code at client side. Javascript jas its own package managers such as NPM. Javascript became the most preferred and popular programming language since facebook launched the React and React native frameworks for web and mobile app development.

#Advantages Of JavaScript-
* Javascript is fast, flexible and light-weight
* It can be used for web apps and mobile apps.
* Javascript can be used for both frontend and backend
* Has huge community and great frameworks available online 

#Dart Vs JavaScript- A Comparison
**1. Popularity-**
Dart is a new language. It has got a huge attention among mobile developers as an alternative to React native. Popular companies like Google, Alibaba are using Flutter.

Right now, javascript is everywhere and many companies are using javascript frameworks for developing mobile and web applications. It can be used for server-side applications and backends so most of the developers are learning javascript as a language.

Know more at- [https://solaceinfotech.com/blog/dart-vs-javascript-a-comparison-that-you-must-know/]
Custom util to get weekday name or number
Tags: javascript, webdev, codenewbie, beginners
Published: 2021-05-26 13:49:56

```js
const getDayNameOrNo = (value) => {
  const mappings = [
    [0, "sunday"],
    [1, "monday"],
    [2, "tuesday"],
    [3, "wednesday"],
    [4, "thursday"],
    [5, "friday"],
    [6, "saturday"],
  ];

  const match = mappings.find(
    ([dayNo, name]) => dayNo === value || name === value
  );

  if (!match) return;

  const [matchedNo, matchedName] = match;
  return matchedNo === value ? matchedName : matchedNo;
};

console.log(getDayNameOrNo(0)); // sunday
console.log(getDayNameOrNo("sunday")); // 0
console.log(getDayNameOrNo("friday")); // 5
```

---

**Thanks for reading 💙**  
Follow **@codedrops.tech** for more.  
[Instagram](https://www.instagram.com/codedrops.tech/) ● [Twitter](https://twitter.com/codedrops_tech) ● [Facebook](https://www.facebook.com/codedrops.tech/)

Micro-Learning ● Web Development ● Javascript ● MERN stack  
**[codedrops.tech](https://www.codedrops.tech/)**

---
**Projects**  
[File Ops](https://marketplace.visualstudio.com/items?itemName=mehullakhanpal.file-ops) - A VS Code extension to easily tag/alias files & quick switch between files
Collapsible SideBar, in 10 lines of javascript;
Tags: javascript, tutorial, webdev, css
Published: 2021-05-26 13:40:19

<a href="https://www.buymeacoffee.com/areeburrub" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy Me A Coffee" style="height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;" ></a>

Some websites use Sidebar in place of Navbar to make the user navigate through there site.
 {% codepen https://codepen.io/areeburrub/pen/wvJeLMO %}

To make this what we can do is, create a div with id sidebar and fix it position on the page then set a height of full page and a width as per need the set `top:0` and `left: -(the width)` if you are adding some border the reduce then add it also to the width;

now create two buttons with id close and open, we can also do it with one button but with two button it will be easier. Fix the position of Buttons also.

Now using javascript get the buttons and sidebar, use `.onclick` to check the click on both button and change the `sidebar.style.left` to make the sidbar come in and out.

>I have used a frost glass effect in the sidebar background have a look at it
{% post https://dev.to/areeburrub/have-the-frost-glass-effect-on-your-website-see-how-hok %}
Why is it essential for startups to hire a MERN stack developer?
Tags: mongodb, express, react, node
Published: 2021-05-26 13:39:27

Why is it essential for startups to hire a MERN stack developer?

• The whole web development cycle to back-end developing from front-end by using JavaScript falls under this.

• Facilitates MVC architecture for making the process of development flow seamlessly.

• It is imperative for MERN developers to be proficient in JSON and JavaScript.

• Open-source framework, which is backed by comprehensive community support.

• Facilitates using pre-built testing tools.

Conclusion

In the article mentioned above, we discussed MERN briefly and the reasons behind the popularity of MERN stack development. All these aspects help to make MERN a feasible technology candidate for any business at present.

Learn more here:https://morioh.com/p/8f6d7dced1b0
VisualForce Basics
Published: 2021-05-26 13:38:27

{! } - Anything inside this format is used to assign values dynamically

$- Prefix is used to denote global action

& - character is the formula language operator that concatenates strings.

$Resource - For static Resource
URLfor() - For combining zipped static resource


*when the {! contacts } expression is evaluated. On this page, Visualforce translates that expression into a call to your controller’s getContacts() method. 
The getContacts() method is called a getter method
Day 3 - IAM Role, MFA and User Audit Security
Tags: aws, 100daysofaws, cloud, devops
Published: 2021-05-26 13:30:57

**Congrat, since you are here this means you have completed Day 2 and working on Day 3**

## Topic Covered
  - IAM Roles
  - Why we need Roles
  - Steps to use Role for any AWS service
  - IAM Security with MFA
  - IAM Security User Audit

{% youtube I2kesQLlsVs %}


## My Notes
  ### IAM Roles and Its use case
  ![JPEG image-01109C6CD770-1](https://user-images.githubusercontent.com/41295276/119606023-6d272180-be0f-11eb-929f-2d7f4898df63.jpeg)
  
  ### IAM Security with Multi Factor Authentication (MFA)
  ![JPEG image-01109C6CD770-2](https://user-images.githubusercontent.com/41295276/119606037-72846c00-be0f-11eb-9228-f4db1ac0e9cc.jpeg)
  
  ### IAM Security with User Audit
  ![JPEG image-01109C6CD770-3](https://user-images.githubusercontent.com/41295276/119606041-73b59900-be0f-11eb-8cd8-9d9306fd8a06.jpeg)


Github Repository for My Hand Written Notes
https://github.com/sarthaksavvy/100DaysOfAWS

Let's Learn together and Real implementation of learning is available at youtube.com/bitfumes

Join my discord server https://discord.gg/neuKDrJ
What is Data visualization?
Published: 2021-05-26 13:24:35

Data Visualization is one of the quickest advancing territories in Analytics and Data Science. With data expanding constantly, we need individuals who can visualize tremendous measure of data as well as impart data based stories to their clients. 

QlikView is one of the quickest developing Business Intelligence (BI) and data visualization instrument. It is quick to send, simple to learn and instinctive to use for a client. Thus, assuming you need to improve data visualization rehearses, Qlikview is the ideal device to begin with. Check out [Qlikview Certification](https://intellipaat.com/qlikview-training/) to learn more.

Data visualization models 

Associations across each industry and area use data visualization to assist them with bettering industry-explicit data sets and business settings. Here are only a couple models. 

Retail 

Retailers use retail data visualization inside retail analytics applications to all the more likely comprehend client purchasing conduct, examine portion of the overall industry, investigate execution improve and dispatch new store areas and the sky is the limit from there. 

Figure out how retailers can utilize a visual portrayal of data to break down buyer perusing data. 

Medical services 

Visualization of medical services data inside medical services analytics applications can help associations in this industry better comprehend clinical varieties, income cycle the executives, work usefulness, patient readmission hazard and the sky is the limit from there. 

Find the best 12 medical services experiences fueled by visual analytics. 

Tech 

Accomplishment in cutting edge relies upon your capacity to distinguish and rapidly react to showcase changes through fast development and execution. That is the reason your groups need in-the-second mindfulness about each part of your business.
5 websites that will help you with the design and branding of your next project.
Tags: javascript, design, html, css
Published: 2021-05-26 13:22:52

---
title: 5 websites that will help you with the design and branding of your next project.
published: true
description: Are you a FrontEnd developerMan? Here are 5 websites that will help you with the design and branding of your next project.
tags: JavaScript, Design, Html, Css
cover_image: https://pbs.twimg.com/media/E2OJ-K0VoAsTD-7?format=jpg&name=medium
---

Are you a FrontEnd developer?

Here are five websites that will help you with the design and branding of your next project.

## 1 [Colorable](https://colorable.jxnblk.com/)
Visualize the combination of background and text colors. Maybe you are building a dark, dim, or light theme.
![colorable](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fkjrib3sifnp78fqcln7.png)

## 2 [Coolors: Color scheme generator](https://coolors.co/generate)
Generate different color palettes. Select primary and secondary colors for your project branding.

Also shows your colors as gradients.
![coolars](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/si3idd8s8hzm5l0xxl2r.png)

## 3 [UnDraw: illustrations for any idea](https://undraw.co/)
Create better-designed websites. Browse to find the images that fit your brand.

Customize the color to match your brand and use it as a normal image.
![undraw screenshot](https://pbs.twimg.com/media/E2OGvLUVkAAK1tH?format=jpg&name=large)

## 4 [Archetype: Typography Design Tool](https://archetypeapp.com/)
Pick font, define size, adjust spacing and see how your text will look and feel.
![archetype](https://pbs.twimg.com/media/E2OIY1wVgAYzVXh?format=jpg&name=large)

## 5 [ScreenLane: Web and mobile design inspiration](https://screenlane.com/)
Get amazing web and mobile version layout and design ideas for your next project.
![screenlane](https://pbs.twimg.com/media/E2OJ-K0VoAsTD-7?format=jpg&name=medium)

------------------------

Thank you for reading.

If you enjoyed this post, found it useful, or felt happy please consider subscribing to my Weekly NewsLetter: https://swastikyadav.com/subscribe
Git: Change author name & email for last commit
Tags: git, webdev, codenewbie, beginners
Published: 2021-05-26 13:19:40

```shell
git commit --amend --author="Codedrops Admin <codedrops.tech@gmail.com>"
```

---

**Thanks for reading 💙**  
Follow **@codedrops.tech** for more.  
[Instagram](https://www.instagram.com/codedrops.tech/) ● [Twitter](https://twitter.com/codedrops_tech) ● [Facebook](https://www.facebook.com/codedrops.tech/)

Micro-Learning ● Web Development ● Javascript ● MERN stack  
**[codedrops.tech](https://www.codedrops.tech/)**

---
**Projects**  
[File Ops](https://marketplace.visualstudio.com/items?itemName=mehullakhanpal.file-ops) - A VS Code extension to easily tag/alias files & quick switch between files
It starts with an export and ends with an import
Tags: swiftui, podcast
Published: 2021-05-26 20:59:05

---
title: It starts with an export and ends with an import
published: true
date: 2021-05-26 13:05:38 UTC
tags: SwiftUI, Podcast
canonical_url: https://www.compileswift.com/podcast/s02-e22/
---

{% spotify spotify:episode:6ZvGobZkyorKuMNCYst2Ez %}

Even personal apps can present challenges, in may ways that is exactly the reason I make them. But sometimes those ‘little’ features can be bigger problems to solve than you think.

So it was this week with exporting and importing a file from an iOS application. Listen of to save you some troubles if you need to do the same thing.
Using Cypress behind a corporate proxy / VPN - oh no!
Tags: webdev, cypress, howto
Published: 2021-05-26 13:01:25

Working behind a corporate VPN / proxy is a situation most of us (especially when working in large corporations) have to face day to day. If so, and if you are using a tool such as ZScaler, you might end up getting a dreaded "Error: unable to get local issuer certificate" error when trying to install Cypress for the first time.

Surely you could disable the VPN, and all would be well - mainly due to Cypress caching the version it downloads.

However - to fix this issue you could also go for the following route of including the binary into your repo (or a mirror of course).

To do so - here is what I've done;

1. Download the binary from Cypress - most likely your CLI will already show the URL for the failed download step.
2. (Skip this step if you will mirror Cypress) Create a folder for your binaries, I've went with making a binaries folder, at the project root and creating a cypress folder there which includes the downloaded file as version.zip, in this case "6.9.1.zip". (You can use a different folder / naming obviously).
3. Create / edit the .npmrc file at the project root level.
4. Depending on your situation add one of the following lines;

  1. If you will include the binary in your own repo like I've noted: `CYPRESS_INSTALL_BINARY=../../binaries/cypress/6.9.1.zip`
  2. If you will mirror the cypress and keep the same layout: `CYPRESS_DOWNLOAD_MIRROR=https://example.com/`
5. Check if it works by running `yarn` or `npm install`. Remember - if it worked even once; you might have stuff still in cache. To make sure that is not the case, you can run `rm -rf $(npx cypress cache path)` which will clear out your cache location.

Hope it helps - happy hacking!
Setting up fake REST API with JSON Server in Angular
Published: 2021-05-26 05:51:41

---
title: Setting up fake REST API with JSON Server in Angular
published: true
description: 
tags: 
//cover_image: https://direct_url_to_image.jpg
---

# What is JSON Server?

JSON Server was created for front-end developers who need a quick back-end for prototyping and mocking. It allows developers to get a full fake REST API using their own data with no coding required.


# Install JSON Server

Open your terminal and run

```
npm i json-server
```

You may also install it globally by adding the `-g` attribute

```
npm install -g json-server
```

# Create JSON database

In the root of your application, create `db.json` file with some data

```
{
  "posts": [
    { "id": 1, "title": "json-server", "author": "typicode" }
  ]
}
```

# Configure JSON server

Open `package.json` file and add the following line of code in the `scripts` object:

```
"scripts" : {
    ...
    "mock:server": "json-server --watch db.json"
}
```

If you have installed json-server globally you may simply run `json-server --watch db.json` in your terminal.

# Run JSON server

```
npm run mock:server
```

Open `http://localhost:3000/posts/1` in your browser to get the following data 

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7aeldh4jfb41m3olqtoo.png)
First coding project
Tags: python
Published: 2021-05-26 12:51:43

My first coding project. A 2 player game for the whole family. I picked tic-tac-toe from a list of other choices.

The program checks for errors and squares in the grid that have already been chosen. It finishes when one person wins or when it's played to a draw. In which case both players equally suck :).

Here's a link to my project on GitHub:
https://github.com/ahlim/TicTacToe.git

Enjoy
Scientific Programming School Bootcamp (Coding Videos)
Tags: tutorial, codenewbie, beginners, promotion
Published: 2021-05-26 12:22:31

Introducing the Scientific Programming School - Bootcamp.
https://bootcamp.scientificprogramming.io/

A 100% free, automated video-based learning platform that curates, organises and shows tutorials on advanced programming and Linux computing. It enables you to "like" videos, create your own "playlist" and provides a "watch later" option. Most of all, it gives you a complete distraction free learning experience. Not to mention, no registration or what so ever is required. 

Currently, the Bootcamp contains 3000+ videos and is curating thousands of videos each day,  pulling together into categories like C/C++, Bash, Perl, Java, JS, Kotlin, Parallel Programming, R, Swift, Matlab and so on. All checked for quality and easiness to digest.

How good is that?
![Scientific Programming School Bootcamp](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f9gt9iiulz8pbj7ugelw.png)

[bootcamp.scientificprogramming.io](https://bootcamp.scientificprogramming.io/)

As a minor reward, please don’t forget to Subscribe our new [YouTube channel](https://www.youtube.com/channel/UCTML7fZU9u0TyMeYi_IpYBQ?sub_confirmation=1) if you want more weekly updates on Linux, Devops, HPC and Advanced coding. We create advanced code videos and present you a platform (scientificprogramming.io) to run scientific codes/ OS commands as you learn with playgrounds and Interactive shells, inside your browser!