teleren/devto huggingface dataset:
Translate Text Between Languages in the Cloud
Tags: aws, cloud, awscommunity, 100daysofcloud
Published: 2023-01-17 08:18:16

[17/100] #100DaysOfCloud Today, I translated text between languages in the cloud.

- Amazon Translate is a neural machine translation service that delivers fast, high-quality, affordable, and customizable language translation.
- Amazon Translate lets you localize content for diverse global users and translate and analyze large volumes of text to activate cross-lingual communication between users.

<u>Use cases :</u>
- Translate user-generated content
 - Automatically translate high volumes of user-generated content, such as social media feed stories, profile descriptions, and comments, in real time.

- Analyze online conversations in different languages
 - Understand sentiments toward your brand, product, or service using a natural language processing (NLP) application that analyzes text in multiple languages.

- Create cross-lingual communications between users
 - Add real-time translation within chat, email, helpdesk, and ticketing applications so an English-speaking agent can communicate with customers across multiple languages.

You can try to translate text between languages in the cloud by yourself by following the steps from the link below :
[GitHub](https://github.com/aaditunni/100DaysOfCloud/tree/main/Journey/017)
How do I learn programming logic in Python?
Tags: programming, python, productivity, beginners
Published: 2023-01-17 09:49:26

There are several ways to learn programming logic in Python:

**Tutorials and online resources: **There are many tutorials and online resources available that can help you learn programming logic in Python. Some popular websites for learning Python include Codecademy, Coursera, and edX.

**Books:** There are many books available that can help you learn programming logic in Python. Some popular books for learning Python include "Python Crash Course" by Eric Matthes, "Automate the Boring Stuff with Python" by Al Sweigart, and "Python for Everybody" by Charles Severance.

**Practice: **Practice is essential for learning programming logic in Python. The more you practice writing code, the better you will understand the concepts and logic behind programming. Try solving small programming problems and exercises, or building small projects to apply your knowledge.

**Join a community: **Joining a community of Python developers can be a great way to learn programming logic. You can ask questions, get feedback, and learn from other people's code. Websites like Stack Overflow and GitHub are great places to connect with other Python developers.

**Take a course:** Taking a course on programming logic in Python can be a great way to learn the language. There are many online and offline courses available, you can find them on websites like Codecademy, Coursera, and edX.

It's important to note that learning programming logic is a continuous process, and the more you practice and apply your knowledge, the better you will understand the concepts and logic behind programming.
Which programming language should I learn?
Tags: programming, productivity, beginners, career
Published: 2023-01-17 09:43:55

“Developers journey is about updation to new technology based on his/her requirement”

Every programming language has a unique set of properties that differ from each other.

Based on the requirement, one can implement it based on the functionality of the project.

E.g: Angular JS is a framework for building dynamic web applications while Node JS is a Cross-platform run-time environment for apps written in JS


Now, Let’s look at some of the popular Programming languages employed by the most well-known websites:

Google.com: C, C++, Go,Java, Python
Facebook.com: Hack, PHP (HHVM), Python, C++, Java, Erlang, D, Haskell
Youtube.com : C, C++, Python, Java,Go
Yahoo.com: PHP
Amazon.com: Java, C++, Perl
Wikipedia.org: PHP, Hack
Twitter.com: C++, Java, Scala, Ruby
Bing.com: ASP.NET
Ebay.com: scala, java, javascript
Msn: ASP.NET
Microsoft: ASP.NET
Linkedin.com: scala, java, javascript
Pinterest: Django (a Python framework), Erlang
WordPress: PHP, JavaScript (Node.js)

After research, You will find out that there are many programming languages and technologies which will take longer to master. To sort out a few technologies to become proficient in, you need the right mentorship.

You need to have proper knowledge of the working of those programming languages in real-world applications on trendy platforms.

By trending, I mean OTT platforms such as Netflix, Disney + Hotstar, and Amazon prime!

OTT platforms are the buzz these days, These platforms have gained popularity with millions of Paid - Subscribers leading to bulk job openings across the globe that make use of sophisticated programming technologies and programming languages.

Learn how to design an OTT platform that stands out.
M - Coloring / Flower Planting With No Adjacent
Tags: javascript, leetcode
Published: 2023-01-17 09:37:08

[Flower Planting With No Adjacent](https://leetcode.com/problems/flower-planting-with-no-adjacent/solutions/3063819/simple-dfs-backtracking-m-color-easy-to-understand/?languageTags=javascript)
```js
const mColoring = (paths, n, m) => {
  let color = new Array(n).fill(0);
  let adj = [];
  for (let i = 0; i < n; i++) {
    adj[i] = [];
  }

  for (let i = 0; i < paths.length; i++) {
    let [to, from] = paths[i];
    adj[to].push(from);
    adj[from].push(to);
  }

  const isSafe = (node, nextColor) => {
    for (let i of adj[node]) {
      if (color[i] === nextColor) {
        return false;
      }
    }
    return true;
  };

  const solve = (node) => {
    if (node === n) {
      return true;
    }
    for (let i = 1; i <= m; i++) {
      if (isSafe(node, i)) {
        color[node] = i;
        if (solve(node + 1)) {
          return true;
        }
      }
    }
  };

  if (solve(0)) {
    console.log(color);
    return true;
  } else {
    return false;
  }
};
const edges = [
  [0, 1],
  [1, 2],
  [2, 3],
  [3, 0],
  [0, 2],
];
console.log(mColoring(edges, 4, 3));

const edges_1 = [
  [0, 1],
  [1, 2],
  [0, 2],
];

console.log(mColoring(edges_1, 3, 2));
```
Resources for learning 𝐒𝐩𝐫𝐢𝐧𝐠 𝐁𝐨𝐨𝐭
Tags: springboo, learning, beginners, programming
Published: 2023-01-17 09:36:09

1️⃣ 𝒊𝒏28𝒎𝒊𝒏𝒖𝒕𝒆𝒔 𝑼𝒅𝒆𝒎𝒚 𝑪𝒐𝒖𝒓𝒔𝒆
This is a great course for beginners. I liked the way he pays attention to smaller things while teaching. They have a YouTube channel also with the Spring Boot course (link in the comment).


2️⃣ 𝑩𝒂𝒆𝒍𝒅𝒖𝒏𝒈 𝑾𝒆𝒃𝒔𝒊𝒕𝒆
Whenever I want to use some new concept in Spring Boot, I just search for baeldung website. They cover all the details & keep the content to the point.

This works for me & I'm sure it'll help you too! 💯
What I would do to get my CV noticed?
Tags: cv, resume, beginners, programming
Published: 2023-01-17 09:34:32

1. Get the basics right

Ensure that your CV doesn’t go beyond 1 page, has a font size of 10/11 at least, has no grammatical errors, has bullet pointers instead of paragraphs, and doesn't run from left to right (makes it difficult for the recruiters to absorb all the information).

Seems easy, right? But more than 50% of the applicants get rejected because they make a mistake here.

2. Quantify your achievements

Be it your marks, the work that you have done or a team that you led back in college, assigning a number to an outcome adds a lot more weight to it.

CGPA 8.5 (Top 5% in a batch of 300) has 10x more impact than only mentioning the CGPA.


3. Prioritize what to write based on the role you are applying for

A lot of us are lazy. The CV we make and submit for a marketing role is identical to the one we make for a consulting role. Different roles require you to signal different capabilities.

A consulting role may need to show a variety of work & a marketing role needs you to focus on domain-level expertise and exposure.

4. Write A Cover Letter

When your CV is accompanied by a cover letter, it shows the effort put in by the candidate in their application.

Include your background, intent behind applying for the role, and the firm along with why you should be considered for the role in the cover letter.

I hope these pointers work for you as they worked for me when I was applying for jobs after college. All the best!
Accessibility in Design: how to create an accessible app?
Tags: design, ux, beginners, webdev
Published: 2023-01-17 09:33:04

{% youtube 1XeCZR0wv1Y %}

Let's talk about the accessibility of desktop and mobile applications with Olga – the UI/UX Designer at Frontend House and Liki Mobile Solutions. 

Why should we take care of accessibility of application?

Watch or read the article at [Frontend House](https://frontendhouse.com/experts-zone/accessibility-in-design-how-to-create-an-accessible-app-experts-zone-talks-21).
Newsletter #1 - 9st January 2023
Published: 2023-01-17 09:05:46

✔️Blog
 
 
📌Kubernetes Master Document
 
https://medium.com/@ranjeetjangra/kubernetes-master-document-2765d5757500


✔️Tools


📌One of the oft-quoted use cases for WebAssembly is plugins. Extism is a framework for implementing a plugin system in your apps, making this much easier to do. Very interesting.


https://github.com/extism/extism


📌A couple of new open source tools, cnquery and cnspec. The first provide a query tool atop cloud infrastructure, handy for asset inventory. The second provides testing and policy based tools on top of that inventory.


https://blog.mondoo.com/cnquery-cnspec
https://github.com/mondoohq/cnquery
https://github.com/mondoohq/cnspec




📌Wolfi is a new lightweight GNU software distribution, a Linux (un)distribution intended to solve supply chain security problems in container environments.
 
https://github.com/chainguard-dev/wolfi-os
https://www.chainguard.dev/unchained/introducing-wolfi-the-first-linux-un-distro






--
You opted in for Devops Weekly at https://enescetinkaya.net.com
If you have other queries you can contact the list maintainer at enes@enescetinkaya.net
Scraping with Ruby p.1
Tags: webdev, ruby, beginners, tutorial
Published: 2023-01-17 09:29:42

Hi,

This time I will be walking through how to scrape a website using Ruby. There are plenty of guides out there for this, and I used a lot of them to freshen up my memory and try new things.

**Goal**: To get a better understanding of scraping, getting the correct data and how to use Nokogiri + Watir together.

I will be splitting this up in parts as I go. Future parts will include fetching multiple pages, parsing to CSV and more.

---
 
## Why use Nokogiri and Watir?
- Nokogiri is a gem that makes it easy to parse and search HTML and XML documents.
- Watir is a gem that allows us to interact with a website using HTTP requests. 

Together, they are a good match and makes it very straight forward and easy.

---

## Getting started
First, you'll need to install the [Nokogiri](https://rubygems.org/gems/nokogiri) and [Watir](https://rubygems.org/gems/watir) gems. You can do this by running the following command in your terminal:

```bash
gem install nokogiri watir
```

## Adding them to your project.
```ruby
require 'nokogiri'
require 'watir'

response = Watir.get('https://www.example.com')
doc = Nokogiri::HTML(response.body)
```

In the above example, we use Watir to make a GET request to the website "https://www.example.com" and store the response in the "response" variable. We then use Nokogiri to parse the HTML from the response's body and store it in the "doc" variable.

## Searching and Extracting Data
Now that we have the HTML from the website in the "doc" variable, we can use Nokogiri to search and extract information from it. Here's an example of how to search for all the h1 tags on the website:

```ruby
h1_tags = doc.search('h1')

h1_tags.each do |h1|
  puts h1.text
end
```

Above, we use Nokogiri's `search method` to find all the h1 tags, and then iterate over each h1 tag and print its text. Easy peasy, right?

But the search method is only one among many methods you can use. Another one that is really convenient is the `CSS selector`.

```ruby
content_p = doc.css('.content p')

puts content_p.text
```

This will search the HTML in `doc` for a paragraph with the class ".content", and then prints the text inside that paragraph.

And that's pretty much it! ✌🏼

---

Now, this is just the tip of the iceberg of what you can do with this.

In the next part, I will go more into things such:
- Fetching all elements and adding logic
- Passing data fetched to a file such as CSV
- Error handling
- Adding headers to your request
- and more.
0 -> Senior
Tags: javascript, beginners, journey, showdev
Published: 2023-01-17 09:02:56

Hi,

Today I am taking the first step.

I have always wanted to write, so I decided that I would combine it, with the opportunity to share knowledge and experiences. These words are the beginning of my journey. The peak I want to reach is the magnificent mountain of 'Senior Development'.

Where you can follow my activities: 
_Journal:_ https://www.chrobok.dev/journal.dev

**Finally, a few words about the past**

Although I am starting out, I am not a complete beginner. I have been learning programming since high school. First Pascal, then C++ and the first console programs.

I went to study in Wrocław, but I ended my adventure after 2 months.

In my spare time from work, I learned HTML and CSS to make my first Website. It was nothing interesting, so I quickly switched to JavaScript. Here the range of possibilities was already much greater.

Once, while looking for a way to watch videos on various platforms, I came across Tampermonkey. A Chrome extension that easily injects your JavaScript into a page. This is where my adventure in creating all kinds of enhancements began.

Through acquaintances, I managed to get an internship at a company, and then I tried my first hand as a Front end Developer. Despite the fact that I mostly fixed bugs in already existing projects, it was my dream job. The culmination of the internship was the opportunity, to create a new graphic design for the website Useless.co.uk.

During the pandemic, I stepped away from programming and, given the opportunity, took up the creation of an e-commerce store. Unfortunately, the will to program was with me all the time, so when it was possible, I tried to automate my work.

At the beginning of the previous year, that is, 2022, I started the project of an application that was to be a kind of calculator, counting profits in a very accurate way using real data. Unfortunately, my e-commerce adventure came to an end.

And so for almost a year in my free time I have been focusing on learning the JavaScript ecosystem, and eventually started a full-fledged job as a JavaScript developer.

And so for almost a year in my spare time I have been focusing on learning the JavaScript ecosystem, to eventually start a full-fledged job as a JavaScript developer.
Top 10 Front-End Framework For Web Development In 2023
Tags: webdev, productivity, career, devops
Published: 2023-01-17 09:23:04

Introduction

Do you know?

What you see on your screen is the work of a [front-end developer](https://creativemediahouse.ae/what-we-do/).

Every web development activity is useless without a front-end. Because, as we all know, computers can understand coding, or better yet, 0 or 1 which is not readable by common users. That is the part of the backend. For developing a website, both the front-end and backend are required. The front-end is what the user can see and experience, whereas the backend is what we have to make the computer understand.

Similarly, when developing a frontend, developers need frame work for the execution of the development process. So let’s have a brief understanding of front-end framework and it’s uses. Meanwhile we will also be able to know the top 10 front-end frameworks for developing a website.

Source: https://creativemediahouse.ae/top-10-front-end-framework-for-web-development-in-2023/
How to increase the performance of a website with Strapi and React
Tags: wordpress, webdev, strapi, beginners
Published: 2023-01-17 09:20:26

Have you ever wondered about migrating from WordPress to Strapi? What is the process and what results you can achieve? It might exceed your expectations!

Improve your site’s Google visibility with our services.

Read the article on [Liki Blog](https://likims.com/blog/how-did-we-increase-the-performance-and-visibility-of-a-business-website-with-strapi-and-react).
one-liner: read first elements of a huge directory
Tags: perl, programming, devops, beginners
Published: 2023-01-17 09:16:42

---
title: one-liner: read first elements of a huge directory
published: true
description: A versy short perl one-liner can help listing part of a huge directory.
tags: perl, programming, devops, beginners
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2023-01-17 08:59 +0000
canonical_url: https://perlmaven.com/oneliner-read-huge-directory
series: perl
---

At a client we have a networked disk with millions of files. I was trying to list the first few files to see what's going on.

`ls -l | head` takes ages, but here is a Perl one-liner to make it work:


```
perl -E 'opendir(my $dh, "/huge_dir"); my $c = 0; while (my $d = readdir($dh)) { say $d; exit if ++$c > 3 }'
```

In a different layout that could be put in a file

```perl
use feature 'say';
opendir(my $dh, "/huge_dir");
my $c = 0;
while (my $d = readdir($dh)) {
    say $d;
    exit if ++$c > 3
}
```

Explanation:

`perl -E` tells perl that the next string is a piece of perl code that should executed. (as opposed to being a filename) This is what let's us write one-liners in Perl. Using the capital letter <b>-E</b> turns on the feature <b>say</b> among other things.

`opendir(my $dh, "/huge_dir");` opens a directory and assigns the directory handle to the new variable called `$dh` that was declared on the spot with `my`

`my $c = 0;` declares a variable called `$c` and assign 0. We'll use this for  counting the entries.

`while (my $d = readdir($dh))` a while loop that for each iteration will read one entry from the directory and assign it to the newly declared variable `$d`.  We declare this variable inside the loop to make it scoped to the loop.

`{ say $d; exit if ++$c > 3 }` the block of the `while loop`. First statement prints the value of `$d` followed by a newline. Then we have a conditional statement in what is called `statement modifier` where the statement comes before the condition. We first increment the counter and then check if it is greater than 3 and if it is then we call `exit`.

I was even a bit overdoing with declarations. If we are not using `strict` we don't need to declare variables. If a variable does not even have value but is incremented using `++` it will behave as if there was a 0 in it. So we don't need to initialize `$c`.

```
perl -E 'opendir($dh, "/huge_dir"); while ($d = readdir($dh)) { say $d; exit if ++$c > 3}'
```

```perl
use feature 'say';
opendir($dh, "/huge_dir");
while ($d = readdir($dh)) {
    say $d;
    exit if ++$c > 3
}
```


And I don't need that `$d` variable either. Instead of that I can use the invisible `$_`:

```
perl -E 'opendir($dh, "/huge_dir"); while (readdir($dh)) { say; exit if ++$c > 3}'
```

```perl
use feature 'say';
opendir($dh, "/huge_dir");
while (readdir($dh)) {
    say;
    exit if ++$c > 3
}
```
I asked ChatGPT to write a blog post about...
Tags: chatgpt, opinion, career, programming
Published: 2023-01-17 09:15:55

... why developers should focus more on code than how much they make. Been meaning to do this myself for a while as a discussion post, but haven't gotten around to it.

I'm busy reading Masters of Doom, which has been on my "to read" list for a long time, but after watching the 5+ hour [interview between Lex Fridman and John Carmack](https://www.youtube.com/watch?v=I845O57ZSy4), I decided it's time. And in there I was reminded of a quote attributed to Carmack about his motivations for getting into development.

This made me reflect on my career and personal life as well. I got into development because I really enjoyed creating something from nothing. I've always been fascinated by how we can tell a machine to do something, and it does exactly what we say, even if we said it wrong. And being able to create something that helps people, or bring them together, or give joy... it's amazing.

I've made some choices in my career that where definitely motivated by money, and I've made choices motivated by fun, and others motivated by the goal of doing good in the world. Where I am now, I know I can't go back to working for a company whose sole purpose is making more revenue and appeasing investors. I need a mission that's more than that, else it doesn't align with why I love programming.

Anyway, enough waffling and intro'ing. Here is what ChatGPT had to say on the topic. I asked it to include the Carmack quote as well. Happy reading, and let me know your thoughts on ChatGPTs "opinion".

![screenshot of chatGPT output](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o8o9ncd69edps0r3ydsq.png)

So there it is. Oh, and then

![screenshot of how to attribute chatGPT](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w2hjvfmic6rtv2rvomh0.png)

I did not do any of those last steps 😆
Select keys to form a tupled map in Clojure
Tags: clojure
Published: 2023-01-17 09:15:25

Example:

Taking a vector of maps that looks like 

```
[{:fruit "apple" :color "red" :brand "Granny Smith"}
 {:fruit "banana" :color "yellow" :brand "Banana shop"}]
```

and converting it into `{:fruit :color}`

```
({"apple" "red"} {"banana" "yellow"})
```
---

Create a hash map from an **even** list of data 

```
(defn create-hash-map [data] (apply hash-map data))
```

Output
```
:> (create-hash-map [1 2 3 4 5 6])
{1 2, 3 4, 5 6}

:> (create-hash-map [1 2 3 4 5])
; Execution error (IllegalArgumentException) at ns/create-hash-map (REPL:31).
; No value supplied for key: 5
```

Extract a key and value from a map to form a tupled map

```
(defn tuple [key value data]
  (-> data
      (select-keys [key value])
      (vals)
      (create-hash-map)))
```

Output 
```
:> (tuple :fruit :color {:fruit "apple" :color "red" :brand "Granny Smith"})
{"apple" "red"}
```

Map through a list of maps to create tuples for each item.

```
 (map
  #(tuple :fruit :color %)
  [{:fruit "apple" :color "red" :brand "Granny Smith"}
   {:fruit "banana" :color "yellow" :brand "South African Bananas"}])
```

Output

```
({"apple" "red"} {"banana" "yellow"})
```
grep: using input file as pattern to search other file
Tags: todayilearned, unix
Published: 2023-01-17 09:05:28

Sometimes we need to use another file which contains a multiple line that 
we want to use as input pattern

example:

You have `a.txt`
```
a
b
c
d
e
```

And you want to search `a`, `c`, `e`.

This case you can create `input.txt`

```
a
c
e
```

and use this command

```
grep -f -F input.txt a.txt
```

If the input txt is a list of _regex_ you can remove the `-F` option.
```
 -F, --fixed-strings
              Interpret PATTERNS as fixed strings, not regular expressions.
```