teleren/devto huggingface dataset:
ML FOR DEVELOPER
Tags: android, machinelearning, beginners, firstyearincode
Published: 2020-08-23 13:58:10

Hello Everyone,This is Ashish Kumar ,I have just started Machine learning and the most interesting thing is that it helps us in predicting results,like we can get an approximate result of a situation on the basis of it's past occurrence.

Basically as a beginner i can describe Machine Learning in the following three magical words
1 __TRAIN__
2 __TEST__
3 __PREDICT__

which means to train the given data and from that predict the future outcomes.So this is the basic thing about ML,now what an android developer can do with it????
   ![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/cu53q98szvl0inzytfdb.jpg)

The most amazing fact is that the applications that our generation is using in our day-to-day life like Netflix,Tinder etc. are one of the top machine learning applications.
So how can We do it??
Step:1
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/4hty4ykb6kvrovj7kvsp.png)
ML Kit brings Google’s machine learning expertise to mobile developers in a powerful and easy-to-use package. Make your iOS and Android apps more engaging, personalized, and helpful with solutions that are optimized to run on device.

now using these packages and dependencies we can easily create a ml app for our phone.This includes some cool stuffs like text recognition,Smart reply,Face detection etc...isn't it cool??

So here is a picture of my first machine learning app using Firebase Ml kit of Smart reply.It will automatically generate text as per your text.it has some basic text features like hi,hello,how are you? etc..and some commonly used emojis.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/kbymqeb12djp3wvf1kij.png)

So this is all abou the ground level now how about creating something cool like object detecting app.just think no need to remeber a person's name just open the app scan the face and it will detect it's name:))

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/9tytnyie8uihbfnqjkew.jpg)

So for this we have Tensorflow lite,in simple words we have convert our data into .tflite file,like the.sfb we did in case of ar app.then the further stages are as i have told 
     1)first collect data for training.
     2)Transfer them into required image
     3)Again train model with new images now make sure you're 
       running it on a suitable device
     4)our data is trained now so attach .tflite file to it and 
        run  your app
And one more thing
What is Tensorflow??
TensorFlow is an end-to-end open source platform for machine learning. It has a comprehensive, flexible ecosystem of tools, libraries and community resources that lets researchers push the state-of-the-art in ML and developers easily build and deploy ML powered applications


![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/6x3gs8omtbhojhx2kxqw.jpeg)

so this image shows how cool it is..Hope this article will be helpful soon i will share with you something like this,till then
Happy coding:))))
Measuring Code Coverage in React, with CodeCov Github Action
Tags: actionshackathon, testing, react, beginners
Published: 2020-08-23 15:12:40

In my previous post I added Github Workflow to run test on every commit and PR request. It was something promising for moving in direaction automation. Also adding test cases helps the code grow without bugs and updates to project are easy. 


### My Workflow

To the available workflow of a test run through Github Action, I added another action by `CodeCov` to measure my test coverage and upload it to [CodeCov](https://codecov.io/) for better understanding and of course charts. 

### Submission Category: 

Maintainer Must-Haves


### Yaml File or Link to Code

```yml

name: Unit/Integration Test Run

on:
  push:
    branches: [master]
  pull_request:
    branches: [master]

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        node-version: [12.x]
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v1
        with:
          node-version: ${{ matrix.node-version }}
      - run: yarn install
      - run: yarn test:coverage
      - name: Upload coverage to Codecov
        uses: codecov/codecov-action@v1

```

The `test:coverage` script for Create React App would be

```
yarn test --watchAll=false --coverage
```

{% github dreamer01/react-login-mock no-readme %}
UP - The Ultimate Provisioner: the modern configuration management, build and automation tool

Tags: cicd, automation, cloud, deploy
Published: 2020-08-23 15:10:06

hey, dear community members. I have just recently published a tool as a full free open source project and I would like to share it with you all

UP - The Ultimate Provisioner: the modern configuration management, build and automation tool

It supports comprehensive workflow orchestration, flexible data modeling, design of composition and test-driven

* Sick of using Makefile, Ansible, Ant, Gradle, Rake and different frameworks ... ?
* Tired of patching Shell scripts, integrating different tools together, elegantly?
* Lacking an overall simple solution of automation, nicely integrated into a Cloud environment?
* Feeling the pains of your DevOps, Ci/CD best practice?
* Need the interoperability to collaborate with popular tools: terraform, packer, vagrant, docker, kubectl, helm .... ?

No worries of replacing anything already setup, UPcmd does not dictate and work exclusively with other tools, rather it incorporates and collaborates with others, but it is capable to be a framework in case you do need it

source code: [https://github.com/upcmd/up](https://github.com/upcmd/up)
official site:[https://upcmd.netlify.app](https://upcmd.netlify.app)

* A sample of execution of release task using up:

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/gjwngeb6omj6i7jsan0n.gif)

* A demo:

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/9alkrhzfhhwtjxbkaqu8.gif)
Open any public GitHub repo in Codesandbox in 3 seconds
Tags: github, devops, tutorial
Published: 2020-08-23 14:44:44


If you are someone who wants to _quickly just lookup some code in a GitHub repository_ or even fork or edit it, then this is a good **handy trick** to know.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/7bvxnodoea6b3j3kysie.gif)



> NOTE: If you are not a PRO member of **codesandbox** then the trick will work only on _Public repositories_


Steps to follow (if the GIF doesn't sum it up 😜): 

**STEP 1:** Open any _Public_ GitHub repository.
**STEP 2:** Go to the URL and append 'box' to your github.com URL in-between 'hub' and '.com' and it will redirect to CodeSandbox.

Here's an example:
```
Change the GitHub URL: 
https://github.com/bhatvikrant/react-thumbnail-player

To: 
https://githubbox.com/bhatvikrant/react-thumbnail-player
```



And that's all you have to do!

[Check out the Codesandbox docs to learn more](https://codesandbox.io/docs/importing)
Cradle of Human Civilization 
Published: 2020-08-23 14:42:37

About 4.5 million years ago, in a declining forest in East Africa, the Earth witnessed something that had never happened in its 13.49 billion years of existence. This event while seemingly insignificant, will change the course of the planet's history forever.

I'm talking about the evolution of humans.

Now, I'm not here to debate about whether evolution happened or not (because there are some people here who do not have the same conviction I have about the veracity of evolution); I simply started this way because it is necessary for the journey we are going to take down the roads of history.

Africa has always been a fascinating place; it is the second largest continent on the planet, has 54 countries with about 5000 different languages. These speak of the amazing people living in it with diverse origins and cultures.

In the modern world, Africa is seen as a backward continent, with little to no technological advancements. (I use the term "advancement" to mean "innovation". Africa is hardly a place where new inventions are birthed.) Most (if not all the countries in Africa) are third world countries, which means that we are "in the past".

But did you know that things were not always like this?

Scientists believe that by 200,000 years ago, some group of humans crossed into the continent of Asia, colonized it and eventually spread out to Europe and eventually the Americas.

The African continent has seen a lot of things, from having a large number of its inhabitants shipped off to slavery, to having the descendants of the people who left the continent colonize its citizens, it has seen it all.

Africa has also been home to some of the most amazing civilizations on the planet. Of course we all know about the Egyptian civilization, but there are many others that testify to the greatness of this continent and its inhabitants.

Here are seven of the lesser known civilizations of ancient Africa:


Read more ➡️
https://www.thezenpens.com/2020/08/15/the-cradle-of-human-civilization-7-ancient-african-civilizations-an-article-by-aquamarine/
Dart & Flutter Easy Wins 22-28
Tags: flutter, dart
Published: 2020-08-23 14:39:49

---
title: Dart & Flutter Easy Wins 22-28
published: true
description: Easy ways to improve your Dart & Flutter code. Published weekly.
tags: flutter, dart
//cover_image: https://direct_url_to_image.jpg
canonical_url: https://codewithandrea.com/tips/dart-flutter-easy-wins-22-28/
series: Dart & Flutter Easy Wins
---

I recently started a series of [daily tweets](https://twitter.com/search?q=from%3Abiz84%20Easy%20Win&src=typed_query&f=live) about easy ways to improve your Dart & Flutter code. I called this **Easy Wins**. 

To make these easier to find, I'm sharing 7 tips every week here.

## 22. Use `toStringAsFixed(n)` to format a number with n decimal places.

![Use toStringAsFixed(n) to format a number with n decimal places.](https://codewithandrea.com/tips/2020-08-23-dart-flutter-easy-wins-22-28/images/022-to-string-as-fixed-narrow.png)

## 23. Did you know? Dart supports string multiplication.

![Did you know? Dart supports string multiplication.](https://codewithandrea.com/tips/2020-08-23-dart-flutter-easy-wins-22-28/images/023.string-multiplication.png)

## 24. One constructor is not enough? Use named constructors and initializer lists for more ergonomic APIs.

![One constructor is not enough? Use named constructors and initializer lists for more ergonomic APIs.](https://codewithandrea.com/tips/2020-08-23-dart-flutter-easy-wins-22-28/images/024.named-constructors.png)

## 25. Prefer factory constructors to static methods for deserialization. 

More info here: [The difference between a "factory constructor" and a "static method"](https://dash-overflow.net/articles/factory/)

![Prefer factory constructors to static methods for deserialization.](https://codewithandrea.com/tips/2020-08-23-dart-flutter-easy-wins-22-28/images/025.prefer-factory-static.png)

## 26. Need a class that can only be instantiated once (aka singleton)? Use static instance variable with a private constructor.

![Need a class that can only be instantiated once (aka singleton)? Use static instance variable with a private constructor.](https://codewithandrea.com/tips/2020-08-23-dart-flutter-easy-wins-22-28/images/026.singleton-private-constructor.png)

## 27. Need a collection of unique items? Use a set rather than a list.

![Need a collection of unique items? Use a set rather than a list.](https://codewithandrea.com/tips/2020-08-23-dart-flutter-easy-wins-22-28/images/027-unique-elements-set-list.png)

## 28. Use inheritance to model ISA relationships.

![Use inheritance to model ISA relationships.](https://codewithandrea.com/tips/2020-08-23-dart-flutter-easy-wins-22-28/images/028-inheritance-ISA.png)


More tips coming next week. [Subscribe via RSS](https://codewithandrea.com/rss.xml) for updates!

Happy coding!
What should you learn first?
Tags: career, webdev, beginners
Published: 2020-08-23 14:12:25

On a daily basis, many people ask me "What technology should I learn first" in order to find a job in the near future.


My answer is most of the time: Choose the technology you want to learn according to your purpose and goal! Choose it according to what you would like to do in the future!

If you choose a technology that allows you to build something that motivates you, you will keep your high motivation for a long time and you will, for sure, create success in your career and life! IT industry is full of opportunities!


Do you want to build  Websites? Learn HTML, CSS, and Javascript   

Do you want to build Backend Systems? Learn Java, C#, .NET or Javascript (NodeJS)   

Do you want to build Android Native Apps? Larne Kotlin or Java

Do you want to build iOS Native Apps? Learn Swift

Do you wanna build hybrid Mobile Apps? Learn Javascript (React Native) or Dart (Flutter)

 (these are just some examples)

Don't make the usual mistake of choosing your first technology because it's easier or it's cool! You will quickly learn that that's not the path you want to follow and it might take you to an industry that will give you ZERO motivation!

Anyway, deciding to start a career in IT is a great choice and I congratulate you for that decision!

Don't know where to start? Contact me and I will try to guide you!
Machine Learning Research should be focusing more on applications
Tags: machinelearning, discuss, datascience, computerscience
Published: 2020-08-23 14:11:43

Machine learning research is focusing less on the practical aspect of the field.The woeful reality is that most of the machine learning research is based around novel discovery of architectures or techniques where as lot's of novel application based works are being sidelined in big conferences like NeurIPS. Reviewers are even disappointed to see the word "application" in the papers.  It would be much better if applied research to solve real life problems related to health, medicine, agriculture, environment, design and other scientific aspects were much appreciated and focused. What do you guise think about this aspect? Should applications of this revolutionary field be more appreciated and focused upon or should all the focus be on the core structures? Let me know in the discussion section ✌️
Check out the article for more details.: https://www.technologyreview.com/2020/08/18/1007196/ai-research-machine-learning-applications-problems-opinion/
Leetcode 26: Remove Duplicates from Sorted Array
Tags: javascript, algorithms, leedcode, array
Published: 2020-08-23 13:50:52

This problem is part of [the Introduction to Data Structures Arrays-101 section](https://leetcode.com/explore/learn/card/fun-with-arrays/511/in-place-operations) in LeetCode.

## Problem Statement

Given a `sorted array nums`, remove the duplicates in-place such that each element appear only once and return the new length.

**Do not allocate extra space for another array**, you must do this by modifying the input array in-place with O(1) extra memory.

**Example 1:**
```
Given nums = [1,1,2],

Your function should return length = 2, with the first two elements of nums being 1 and 2 respectively.
```
**Example 2:**
```
Given nums = [0,0,1,1,1,2,2,3,3,4],

Your function should return length = 5, with the first five elements of nums being modified to 0, 1, 2, 3, and 4 respectively.
```

## Solution 
### Two pointers

The given array is a sorted array, so duplicate numbers will be group together. First, we can handle the edge case of empty array. Then we can start iterating elements from the head. 

The second pointer will go through all elements in the list, and the first pointer only move when meeting the unique number.

```javascript
var removeDuplicates = function(nums) {
   // Handling Edge Case
   if(nums.length === 0 ) return 0
	 let p1 = 0
	 for(let p2 = 1; p2< nums.length; p2++){
		if(nums[p1] !== nums[p2]){
			p1++;
			nums[p1] = nums[p2]
		}		
	 }
	return p1 +1		
}
```

Beside, we can also start iterator from the end of array. If the value of two pointer is the same, then remove the element.

```javascript
var removeDuplicates = function(nums) {
    // Handling Edge Case
    if(nums.length === 0 ) return 0
    for(let i = nums.length-1; i > 0;i--){
        if(nums[i]===nums[i-1]){
            nums.splice(i,1)
        }
    }
    return nums.length
};
```
React component code smells: Incompatible props
Tags: javascript, react
Published: 2020-08-23 13:50:39

---
title: React component code smells: Incompatible props
published: true
description: Avoid passing props that are incompatible with each other in your React components
tags: javascript,react
cover_image: https://images.unsplash.com/photo-1542227500-8e8f1d03f876?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1000&h=420&q=80
canonical_url: https://dev.to/awnton/react-component-code-smells-incompatible-props-2jh5
---

I've started researching and writing about code smells in React components, and one of the most common ones I've come across is having incompatible props on the same component.

[Read full article here](https://dev.to/awnton/7-code-smells-in-react-components-5f66)
Holiday end
Published: 2020-08-23 13:50:33

<sub><span>Photo by <a href="https://unsplash.com/@sandramode?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Sandra Ahn Mode</a> on <a href="https://unsplash.com/s/photos/castle?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></span></sub>

No content this week, enjoy your holidays (if you are lucky to have some) !
But i'm still looking at KubeCon during my holidays !
Customizing styles for ordered list (HTML5 + CSS3)
Tags: css, html, codepen, trick
Published: 2020-08-23 13:44:27

## _Introduction_

This week at work, the need arose to add custom styles to an **ordered list** in **HTML5**, it is a task that I had not done too many times, so I had to learn how to add styles to an **ordered list** in **HTML5** using **CSS3**. So I think it can be helpful to share this knowledge with the **community**, I leave a **codepen** below with the code.

## _Demo_

#### _Ordered list without styles_

{% codepen https://codepen.io/susomejias/pen/PoNWWob %}

#### _Ordered list with custom styles_

{% codepen https://codepen.io/susomejias/pen/JjXERvy %}


Thanks for reading me. 😊



![thankYou](https://media.giphy.com/media/Jo7Cu93qRLGyxe55IX/giphy.gif)
What if learning web development felt more like playing Pokemon?
Tags: webdev, games, tutorial, practice
Published: 2020-08-23 13:22:56

- Each concept was split into three levels, each increasing in difficulty
- Solving a challenge was framed as a turn-based brawl against an enemy slightly above your skill level
- The concepts you learned were symbolized as weapons available to you in your next battle

##The last bullet may seem like 'badges' and 'gamification'. It's not.

##The first bullet may seem like the tag associated with an entire course. It's not.

##The second bullet seems revolutionary. It could be.

###While no such experience exists, I made this game that finally helps you teach yourself web development:
- [Fix a function!](http://freecodegame.com)

Try it today. Play again tomorrow. Within a week, you'll be a better front-end developer.
100DaysOfCode | Day 23
Tags: 100daysofcode, challenge, python, linux
Published: 2020-08-23 13:20:16

▄█ █▀█ █▀█ █▀▄ ▄▀█ █▄█ █▀ █▀█ █▀▀ █▀▀ █▀█ █▀▄ █▀▀
░█ █▄█ █▄█ █▄▀ █▀█ ░█░ ▄█ █▄█ █▀░ █▄▄ █▄█ █▄▀ ██▄

3 Days ago...
I switched from __Linux(Pop!_OS)__ to Windows for an online class, but after finishing the  class when I decided to switch to Linux, my BIOS corrupted and I lost my Linux :(
I didn't find any solution to solve this problem, so I Installed __Pop!_OS__ again.

I lost all of my apps and information but finally I learned how to set my Grub correctly to prevent corrupting again.
But I'm feeling not really good, cause I couldn't code 1 hour every day and because of that I should try harder to fill that gap.
Actually I learned how to set my grub, and that's a good point for me, cause I had a problem with my Pop!_OS grub all the time, because you need to set it Manually!(Most of the Distros are not like this).
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/w358axtoz0tjilu880hv.jpeg)
So I should start to learn and code again, Today should be my 25th day but I wrote 23 cause I don't wanna jump from 23 to 25 without learning and coding!(Actually without consistency)



Keep Moving Forward __ツ__

Enjoy Your Journey 👊

Code with __💛__

__🅑🅐🅝🅙🅘__
forEach - Array functions
Tags: javascript, beginners, codenewbie, tutorial
Published: 2020-08-23 12:58:36

Looping is an essential part of project development. We have the basic for loop to iterate through the code to execute a certain set of codes. forEach and map functions help in iterating through a function for each element present in the array.

###forEach

```
Syntax : 

array.forEach(callback(item, index, array), thisVar)

array - contains the list of elements for which we want to run the callback function
item - (*optional*) Each item is passed to the function as an argument.
index - (*optional*) Contains the index of the element that is passed as an argument.
thisVar - (*optional*) Used to set the context for the given function, upper scope. It is not needed if we use the arrow functions

Note - The return value is "undefined"
```

There is no way to stop or break a forEach() function. If we want such behavior this can be achieved using simple for loop, for...in, for...of, or other array functions like every(), some(), find(), findIndex().

Also, we need to take care forEach doesn't account for asynchronous functions and thus it is better to avoid it during API calls.

###No operation for uninitialized values

```
const array = ["Hello","World",,"skipped uninitialized value"]
let numCallbackRuns = 0

arraySparse.forEach((element) => {
  console.log(element)
  numCallbackRuns++
})

console.log("numCallbackRuns: ", numCallbackRuns)

// Hello
// World
// skipped uninitialized value
// numCallbackRuns: 3
// the missing value between "World" and "skipped uninitialized value" didn't invoke the callback function. Even if it would have been a "", it would have a count
```

###Converting for loop to forEach

```
const shop = ['banana', 'rice', 'pulses']
const copyItems = []

// before
for (let i = 0; i < shop.length; i++) {
  copyItems.push(shop[i])
}

// after
shop.forEach(function(item){
  copyItems.push(item)
})
```