teleren/devto huggingface dataset:
Before you begin Coding, Answer those questions!
Tags: beginners, devops, discuss, codenewbie
Published: 2021-08-27 16:23:56

## 1. Why should I learn programming? ##
Ask yourself this question before you jump on coding because it is so important to set goals first and work on them step by step. It gives you a clear vision on what you are doing but also you will feel motivated and more disciplined so you can achieve your main goal. *For me*, I had the idea to create my own music website and application as well as adding new options and aesthetic themes for a better experience.
## 2. What is the right field you should follow? ##
Programming has various fields and roles you can choose from such as **web development**, **data science**, **game development** etc.. The reason why you want to start learning coding may easily lead you to answer this question. *For me*, it was all about web development and mobile app development obviously.
## 3. What programming languages should I learn? ##
As you may conclude, those three questions are related to others and they will help you to define the right path for you. Programming languages are even more compound and each one has his own functions and syntax that it will make you feel confused and frustrated if you are going to learn them jointly. The most common languages are **Javascript, Python, Swift, Solidity** etc...
*For me*, I had to learn HTML5, CSS+ ,javascript, swift..
*Please make sure to choose the right programming languages*
Free Resources to learn Django !! 
Tags: django, python, react
Published: 2021-08-27 16:22:34

Choosing a web framework for a project is a big deal!!. There are plenty of frameworks on the market right now. Django provides versatile features and options for the developers. Their main goals are faster development, scalability, more security.

Django provides fully loaded features like Built-in Admin Interface, ORM, Python unit testing framework, Middleware Support, Template engine, Form handling and validation, authentication system, Session and user management, role-based permissions.

So, choosing the Django framework is a good choice and has more opportunities in the future.

Here is the list of free resources

[Django Documentation](https://www.djangoproject.com/start/) - Well-detailed documentation ever. My first recommendation is Django official docs, they explained every concept in detail. Check it out.

**Free Websites to learn Django**

[Django Girls](https://tutorial.djangogirls.org/en/)

[Real Python](https://realpython.com/tutorials/django/)

[Data Flair Training](https://data-flair.training/blogs/django-tutorial/)

**Basics of Django** 

[Telusko](https://youtu.be/SIyxjRJ8VNY)

[Coding Entrepreneurs](https://www.youtube.com/watch?v=RUMohoZzNLc&list=PLEsfXFp6DpzT-1RVQVsL7C2XGMeQzfqAL)

[Dennis Ivy](https://www.youtube.com/watch?v=xv_bwpA_aEA&list=PL-51WBLyFTg2vW-_6XBoUpE7vpmoR3ztO)

[Programming with Harry](https://www.youtube.com/watch?v=MxF8YOJI0nU&list=PLK8cqdr55Tsv-D2HMdrnD32oOVBNvmxjr)


**To learn Django, Django REST Framework with React JS**

[JustDjango](https://www.youtube.com/channel/UCRM1gWNTDx0SHIqUJygD-kQ) - If you want to learn REST API with Django and Django REST Framework with React JS.

[Very Academy](https://www.youtube.com/channel/UC1mxuk7tuQT2D0qTMgKji3w) - This channel also provides content on Django, Django REST Framework, and React JS by project-based learning.


Thanks for reading this article so far. If you find these free Django courses useful then please share them with your friends and colleagues. If you have any questions or feedback then please drop a note.
A naive installation of Ruby and Rails on OpenBSD
Tags: ruby, rails, openbsd
Published: 2021-08-27 16:21:24

[image credits](https://unsplash.com/photos/Hq32VUY0xMg)

Here's the environment we'll play with (just an excuse to use `neofetch`):

![OpenBSD environment information as shown by the command `neofetch`](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nizoz3ed3eu9e86d9idw.png)

The packages are handy but I'd prefer to keep the installation within my home in order to make actions like `bundle install` work without the need for super user permissions or custom configurations.

Also, I don't mind reducing the number of indirection layers.

First of all prepare the directory in which we'll install Ruby.

```shell
$ mkdir ~/.rubies
```

Note that we're doing this to avoid the need for the superuser.

Then download the sources of the latest version (_3.0.2_) and install them into our user directory:

```shell
$ curl -LO https://cache.ruby-lang.org/pub/ruby/3.0/ruby-3.0.2.tar.gz
$ tar xvfz ruby-3.0.2.tar.gz
$ cd ruby-3.0.2
$ ./configure --prefix ~/.rubies/3.0.2
$ make
$ make install
```

For convenience, link the newly installed version with the "current" alias:

```shell
$ ln -s $HOME/.rubies/3.0.2 $HOME/rubies/current
```

Edit `~/.profile` and add `$HOME/.rubies/current/bin` to the `$PATH` so that the binaries will more easily be available in the terminal:

```shell
PATH=$HOME/.rubies/current/bin:$HOME/bin:__the rest of the path list here__
```

Here's our little precious:

```shell
$ ruby -v
ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-openbsd6.9]
```

## Nokogiri

Using the same approach described for _FreeBSD_ in https://nokogiri.org/tutorials/installing_nokogiri.html#installing-using-standard-system-libraries we'll install the `pkgconf` package (note that the current user needs to be enabled for `doas`):

```shell
$ doas pkg install pkgconf
$ gem install nokogiri --platform=ruby -- --use-system-libraries
```

## A new dawn

Time to test that the big boy works (picking "rails API only" to make things simpler):

```shell
$ gem install rails
$ rails new --api yolo
$ cd yolo
$ rails server
```

Now open another terminal (or the browser at http://localhost:3000) and enjoy the view:

```shell
$ curl http://localhost:3000
```

![Two woman jumping happily on the street](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bwemcfrl15je4ulmfkip.jpeg)

[image credits](https://unsplash.com/photos/87EqZAWN-v8)
Leetcode : 521. Longest Uncommon Subsequence I
Tags: programming, python
Published: 2021-08-27 15:52:16

[Link to the question on Leetcode]: https://leetcode.com/problems/longest-uncommon-subsequence-i/

**Problem Statement**

Given two strings `a` and `b`, return *the length of the **longest uncommon subsequence** between* `a` *and* `b`. If the longest uncommon subsequence does not exist, return `-1`.

An **uncommon subsequence** between two strings is a string that is a **subsequence of one but not the other**.

A **subsequence** of a string `s` is a string that can be obtained after deleting any number of characters from `s`.

- For example, `"abc"` is a subsequence of `"aebdc"` because you can delete the underlined characters in `"aebdc"` to get `"abc"`. Other subsequences of `"aebdc"` include `"aebdc"`, `"aeb"`, and `""` (empty string).



**Example 1:**

```
Input: a = "aba", b = "cdc"
Output: 3
Explanation: One longest uncommon subsequence is "aba" because "aba" is a subsequence of "aba" but not "cdc".
Note that "cdc" is also a longest uncommon subsequence.
```

**Example 2:**

```
Input: a = "aaa", b = "bbb"
Output: 3
Explanation: The longest uncommon subsequences are "aaa" and "bbb".
```

**Example 3:**

```
Input: a = "aaa", b = "aaa"
Output: -1
Explanation: Every subsequence of string a is also a subsequence of string b. Similarly, every subsequence of string b is also a subsequence of string a.
```

 

**Constraints:**

- `1 <= a.length, b.length <= 100`

- `a` and `b` consist of lower-case English letters.

  

***



**Idea**

> **Brute Force Solution:** Generate all the subsequences of both the strings and store the frequency of each subsequence in a hashmap/dictionary. The subsequence whose frequency equal to **1** will be the longest uncommon subsequence. If there is not subsequence with frequency as **1** , then there is no uncommon subsequence for given strings.



> **Optimized Solution:** 
>
> 1. If **both the given strings are equal** then there will not be uncommon subsequences for given strings. In this case we can directly return **-1**
> 2. If the **strings are not equal and length of both the strings are equal** , then one string cannot be the subsequence of other string. In this case we can either return **length of any one of the strings**.
> 3. If **both strings are not equal and length of one string is greater than length of other string**, then in this case we can directly return the **length of the largest string** as the largest string cannot be the subsequence of the smaller string.



***



**Code(Python)**

```python
class Solution:
    def findLUSlength(self, a: str, b: str) -> int:
        if a == b:
            return -1
        a_length = len(a)
        b_length = len(b)
        return max(a_length,b_length)
```
***
Below git repo contains some important programming questions and solution from **leetcode** and **interviewbit**

{% github dheerajthodupunoori/problem-solving %}
HOW TO RUN DATA SCIENCE PROJECT USING JUPYTER NOTEBOOK
Tags: python, jupyter, datascience
Published: 2021-08-27 15:50:55

**Processes:**
Download and install anaconda.
Launch Jupyter notebook (anaconda3)

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

This will direct you to a web browser
If you are creating a new project from the scratch, click New, then folder

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

Then open the new created folder and under new click python 3
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bj1ao83h1mfrgdavas0z.JPG)
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pco0s0ulp9em1tcaqlp6.JPG)
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/12k2lsbv1nwc4kingisz.JPG)


Start by importing all the libraries the will be required while running the program and click Run to ensure that all the libraries are installed into your computer.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xu5ylgfebtsqsi5gp4jk.JPG)
Then load the dataset
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bc13mkz8dqne5vucnfgm.JPG)
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8ujnul63omzuare517tt.JPG)

Train the dataset
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y62b7a3xexspbbcc0dfv.JPG)
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x94d10f068xv16vqlluc.JPG)
Graphical representation of the output
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xfty62b4ov2bipijdtl8.JPG)
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ic5mb3e9hl5uy7741kui.JPG)
Separate routing from business logic in node.js | Central response generation in node.js
Tags: node, webdev, routing, modularity
Published: 2021-08-27 15:42:09

Its important to keep the code that executes the business logic separate from the  request routing. The separation helps code modularity and enhances separation of concerns. In my post [What are routes in node.js ? How routes help writing modularized code ?](https://www.cloudnativemaster.com/post/routes-in-node-js-writing-modularized-codes-using-routes) I explained how we can use routers to handle multiple APIs, each API family can be separated using a separate router. You can easily imagine when the actual business logic is implemented the inline-function in the routers that handles the request will be much bigger and complicated. 

First, as the number of APIs increase, keeping the routing logic and the business logic to process the requests in the same file is not going to scale and becomes cumbersome. We would like to separate the business logic from the routing logic. The router layer just should contain the routing logic and the business layer contains the business logic, the routing layer should use the business layer functions. For example, when we do user management (e.g create, update, view user) and order management (create, update, view order) we write all logic related to user management in a separate .js file and logic related to order management in another .js file. Here we write the business logic that is needed for user and order management. We can also write a separate function for each operation (e.g create user, view user, update user) in each of the files. Then we create a router for each routing family, for example a router for user management that starts with /user, a route for order management that starts with /order and so on. And finally we associate the particular REST call in the router with the particular operation in the business logic. For this we just have to import the .js file that has the business logic to the .js router file. You can see an example in my [blog here](https://www.cloudnativemaster.com/post/separate-routing-from-business-logic-in-node-js-central-response-generation-in-node-js#viewer-711l8)  


Second, in each function when we perform HTTP response generation we are repeating some of the logic necessary for response formulation. We should have a central method for request processing, used by all functions for all routers. I have also shown this in the same blog that I have linked above.
Funny JavaScript frameworks - You don't know about
Tags: javascript, webdev, programming, discuss
Published: 2021-08-27 15:38:12

We all know the dominance of **JavaScript frameworks/libraries** in web development and other fields too. At the same time, developers try to make cool js libraries and somehow they end up making funny libraries. *Or, they intentionally make those.*

## And here are some of the funny javascript libraries that actually exits:

### 1. [Fart.js](http://www.jsfart.com)

![jsfart website](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a3m0eq0kpx6gazqi4nvz.png)

> They say, "Add the most natural sound on earth to your pages."

It was created 7 years ago on 2014. You can use this library if you want natural sound of fart😂. And you can also contribute to this library [here](https://github.com/74656c/fart.js/) 😏.

### 2. [Thanos.js](https://thanosjs.org/)

![Thanosjs website](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/98ri05zwk8e5vyj1rovn.png)

> It reduces the size of your project by half with just a snap. 

Well, *you are here to read about weirdest libraries.* So I've something for you, **It reduces the file size of your project down to 50%, by randomly deleting half of the files😆.** Needless to say, this JavaScript tool isn’t intended for serious use.

### 3. [FuckItJs](https://github.com/mattdiamond/fuckitjs)

![Fuckitjs github](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nomochi9g5xjg7jtxwja.png)

> FuckItJS make all bugs and error messages instantly go away.

It repeatedly **compiles** your code, **detect** errors, and **slices** those lines out of the script through a process known as Eval-Rinse-Reload-And-Repeat. If your bugs aren't solving then you can use this to feel good. <br>
**Pro tip:** *Don't use it in production environment😆.*

### 4. [Vaporjs](https://github.com/madrobby/vapor.js)

![Vaporjs github](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ghr9k4phiibs0ubm6cpq.png)

> It is the most flexible javascript framework on the web.

It doesn't **limit your creativity** by forcing you to follow an approach that doesn’t fit your style *(like many other framework does)* and way of thinking. And you can learn in in just few seconds cause **it contains exactly zero lines of code😂.**

### 5. [ComCastifyjs](https://github.com/theonion/comcastifyjs)

![Comcastify slow image loading](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/69cnmhrlex30vk37uuf8.png)

> Slow down loading your website's images 😆

If you have **optimized website** and it loads faster but you want your users to experience *how images used to load with a dial-up internet connection* then you can use comcastify. Go [here](http://theonion.github.io/comcastifyjs/) and experience the image loading experience.

That's it for now, if you know more of them then please let me know, cause I enjoy, I mean I really enjoy😆.
TCP port numbers
Published: 2021-08-27 15:28:23

Port Number    Description
1                TCP Port Service Multiplexer (TCPMUX)
5                Remote Job Entry (RJE)
7                ECHO
18                Message Send Protocol (MSP)
20                FTP -- Data
21                FTP -- Control
22                SSH Remote Login Protocol
23                Telnet
25                Simple Mail Transfer Protocol (SMTP)
29                MSG ICP
37                Time
42                Host Name Server (Nameserv)
43                WhoIs
49                Login Host Protocol (Login)
53                Domain Name System (DNS)
69                Trivial File Transfer Protocol (TFTP)
70                Gopher Services
79                Finger
80                HTTP
103                X.400 Standard
108                SNA Gateway Access Server
109                POP2
110                POP3
115                Simple File Transfer Protocol (SFTP)
118                SQL Services
119                Newsgroup (NNTP)
137                NetBIOS Name Service
139                NetBIOS Datagram Service
143                Interim Mail Access Protocol (IMAP)
150                NetBIOS Session Service
156                SQL Server
161                SNMP
179                Border Gateway Protocol (BGP)
190                Gateway Access Control Protocol (GACP)
194                Internet Relay Chat (IRC)
197                Directory Location Service (DLS)
389                Lightweight Directory Access Protocol (LDAP)
396                Novell Netware over IP
443                HTTPS
444                Simple Network Paging Protocol (SNPP)
445                Microsoft-DS
458                Apple QuickTime
546                DHCP Client
547                DHCP Server
563                SNEWS
569                MSN
1080               Socks
Create a Spotify Clone with Song Playing Feature.
Tags: javascript, react, node, api
Published: 2021-08-27 15:27:24

In this post i describe you how i build a spotify clone using ReactJS,Redux and Spotify Web & Playback API.

Note:Only for Spotify Premium Users.and This is currently in development but you can view current build online by going.

[here](https://spotify-clone-steel-alpha.vercel.app)

Features

* User can view his/her profile
* User can play track,album,playlist
* User can control active device volume.
* User can perform play,pause,next,previous song.
* User can create playlist.

Bugs currently have

* There some glitch in play and pause button when we play a song directly inside app.

* You may encountered some problem in login to app due to spotify access_token stored in cookie basically this is happen because spotify provide an expiration time of access_token of 1 hour so after one hour that token expire but not deleted from cookies so to fix this you have to delete manually from the cookies if you are in Chrome You can visit dev option>application>cookies>url of website and here you find SPOTIFY_TOKEN just remove or delete and refresh the web page then try to login now this issue fixed.


Sorry but i cannot explain the whole project in this post but you can ping me on [linkedin]('https://www.linkedin.com/in/sumit-kumar-097a3a204/') or directly on Dev community by sending a message.

## Demo Video

<video src="https://user-images.githubusercontent.com/30069626/131150439-29886780-49b4-4a86-ae85-ba4f6377ef4b.mov" controls/>

sorry you may found some noise in demo video.



Please give a ⭐️ to  [repo](https://github.com/Ammyy9908/spotify_clone) if You Like This


📙~Only supports Spotify Premium Accounts.
Medication Scheduler UI Kit Free

Published: 2021-08-27 15:03:48

Medication Scheduler is a lightweight UI kit for mobile apps with 26+ carefully crafted screens, based on scalable core styles setup and auto-layout components, all set on an 8px grid.

Built with cascading Text and Layer Styles to ensure effortless customization. A great starting point for mobile app projects. The kit is ready to use out of the box or you can customize colors, fonts and other effects for your styling needs.

Download here: https://uitemplate.net/medication-scheduler-ui-kit-free
Automating POST API request using HTTP Client❗
Tags: httpclient, automation, testing, java
Published: 2021-08-27 14:55:50

This article will help you implement the Marshalling concept for creating the JSON payload 😃

https://medium.com/@prathore28647/apis-and-http-client-post-call-7f68d5a66fd9

Scenario: Follow me on Medium and check out other interesting articles.
Steps to reproduce:
 1. Open the article
 2. Click on follow button on the Top
 3. Sign up with your Google account

Salud 🍻
Hiring Frontend Developers!
Published: 2021-08-27 14:51:15

Hello all,

We are Hiring!

Hiring for FrontEnd Developer in Germany, #Permanent #position.

If you are interested or have any references mail me at suresh.pari@aguilaitconsulting.co.uk

If you are not interested or not looking for a change, Please Like, Comment, or Share, For a better reach.

" We do not provide any sponsorship to the job aspirants "

#Note:- We only need the candidates who have valid work permits in #Germany.


#Frontend_developer #JavaScript #React #ReactJs #Vue #Springboot #Web_developer #Web_development #careers #jobsearch #Jobopening
#Recruitment #Jobhunters #CV #nowhiring #Networking #Workfromhome #Technology #2021_hiring
RSpec Tracer
Published: 2021-08-27 14:42:15

https://github.com/avmnu-sng/rspec-tracer

![First Run](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vzptgrsf7kyt763a7h3d.gif)

RSpec Tracer is a specs dependency analysis tool and a test skipper for RSpec. It maintains a list of files for each test, enabling itself to skip tests in the subsequent runs if none of the dependent files are changed.

It uses Ruby's built-in coverage library to keep track of the coverage for each test. For each test executed, the coverage diff provides the desired file list. RSpec Tracer takes care of reporting the correct code coverage when skipping tests by using the cached reports. Also, note that it will never skip any tests which failed or were pending in the last runs.

Knowing the examples and files dependency gives us a better insight into the codebase, and we have a clear idea of what to test for when making any changes. With this data, we can also analyze the coupling between different components and much more.
Getting into DevRel
Tags: community, developer, github, devrel
Published: 2021-08-27 14:34:39

**This post was originally published on Fri, Aug 27, 2021 at [cloudwithchris.com](https://www.cloudwithchris.com/episode/tales-from-real-world-get-into-devrel/).**

In this session, Chris is joined by Martin Woodward - Director of Developer Relations at GitHub to talk about building communities, building experience talking and leading communities and then of Developer Relations, what it means and how to get into that role as your job.

{% youtube 3KNm612ZQXM %}
Creative Coding Auto-Paint
Tags: codegolf, javascript, canvas, texture
Published: 2021-08-27 13:45:15

This is a somewhat golfed, speed coded texture - some funny little tricks in this one:

{% codepen https://codepen.io/ZevanRosser/pen/PojqQEK default-tab=js,result %}

_See more stuff like this over @ [Snippet Zone](https://snippet.zone/)_