teleren/devto huggingface dataset:
Countries Data
Tags: programming, javascript, java, python
Published: 2020-11-27 15:33:29

For the last couple of months, I was working on a large project in which I needed to use the list of countries in both English and Arabic languages. At first glance, I thought finding this list was going to be easy as it looks like a common problem, right? But unfortunately, it wasn't.

Most of the data I've found weren't organized properly, and it was too hard to extract the necessary data without putting in a huge effort. 

I decided to use some API having this data already, but I faced some problems. Most of the APIs provide you with a limited number of requests per month. If you want more requests, you've to pay more and more. Unfortunately, the free ones weren't reliable.

Despite all of that, I had two major problems. The first one, we may have situations in which we want to relate some data to some countries in our database with foreign keys. So, the APIs won't be useful, and I have to store the data in the database. For the second one, all the solutions I've found weren't providing Arabic data.

So, I decided to build the data on my own. With the help of [GeoNames](https://www.geonames.org) public data and with some extra effort to translate the data and add extra fields, I created [amrsaeedhosny/countries](https://github.com/amrsaeedhosny/countries) repository on GitHub.

## Country Data

Each country has the following data:

* English Name.
* Arabic Name.
* [ISO 3166-1](https://www.iso.org/iso-3166-country-codes.html) Alpha-2 Code.
* [ISO 3166-1](https://www.iso.org/iso-3166-country-codes.html) Alpha-3 Code.
* Phone Code.

## Available File Formats

The countries data are stored in multiple file formats:

* CSV:

English Name|Arabic Name|Alpha-2 Code|Alpha-3 Code|Phone Code
:-----:|:-----:|:-----:|:-----:|:-----:
Egypt|مصر|EG|EGY|20

* JSON:
```json
{
 "english_name": "Egypt",
 "arabic_name": "مصر",
 "alpha2_code": "EG",
 "alpha3_code": "EGY",
 "phone_code": "20"
}
```

* SQL:
```sql
INSERT INTO COUNTRY (ENGLISH_NAME, ARABIC_NAME, ALPHA2_CODE, ALPHA3_CODE, PHONE_CODE) VALUES('Egypt', 'مصر', 'EG', 'EGY', '20');
```

## Custom File Format

There is also a simple python script that you can use to build your own file format:

```python
import csv

my_file = open("my_file.txt", "w")

with open('countries.csv') as csv_file:
    csv_reader = csv.reader(csv_file)
    csv_reader.next()
    for row in csv_reader:
        for column in row:
            my_file.write(column + ",")
        my_file.write("\n")

my_file.close()
```

Now the problem has been solved once, and I can use the data easily whenever I need it. 

By reaching this, you've to know that you're free to use this data in your own projects. Actually, that was the whole point of this article. So, enjoy!
🚀10 Trending projects on GitHub for web developers - 27th November 2020
Tags: javascript, react, typescript, css
Published: 2020-11-27 15:32:19

Trending Projects is available as a weekly newsletter please sign up at [www.iainfreestone.com](https://www.iainfreestone.com) to ensure you never miss an issue.

### 1. JSX Lite

Write components once, run everywhere. Compiles to Vue, React, Solid, Angular, Svelte, and Liquid. Import code from Figma and Builder.io

{% github BuilderIO/jsx-lite %}

---

### 2. Ramda

A practical functional library for JavaScript programmersdesigned specifically for a functional programming style, one that makes it easy to create functional pipelines, one that never mutates user data.

{% github ramda/ramda %}

---

### 3. CesiumJS 

CesiumJS is a JavaScript library for creating 3D globes and 2D maps in a web browser without a plugin. It uses WebGL for hardware-accelerated graphics, and is cross-platform, cross-browser, and tuned for dynamic-data visualization.

{% github CesiumGS/cesium %}

---

### 4. G2Plot

G2Plot is an interactive and responsive charting library. Based on the grammar of graphics, you can easily make superior statistical charts through a few lines of code.

{% github antvis/G2Plot %}

---

### 5. Layr 

Layr is a set of JavaScript/TypeScript libraries to dramatically simplify the development of full-stack applications.

{% github layrjs/layr %}

---

### 6. Type Challenges

This project is aimed at helping you better understand how the type system works, writing your own utilities, or just having fun with the challenges. We are also trying to form a community that you can ask questions and get answers you have faced in the real world - they may become part of the challenges!

{% github type-challenges/type-challenges %}

---

### 7. DevOps Resources

This repository is about gathering any useful resources and information regarding DevOps

{% github bregman-arie/devops-resources %}

---

### 8. SpinKit

Simple loading spinners animated with CSS. SpinKit only uses (transform and opacity) CSS animations to create smooth and easily customizable animations.

{% github tobiasahlin/SpinKit %}

---

### 9. Beautiful React Hooks

A collection of beautiful (and hopefully useful) React hooks to speed-up your components and hooks development.

{% github beautifulinteractions/beautiful-react-hooks %}

---

### 10. Type Fest

A collection of essential TypeScript types

{% github sindresorhus/type-fest %}

---

Trending Projects is available as a weekly newsletter please sign up at [www.iainfreestone.com](https://www.iainfreestone.com) to ensure you never miss an issue.

If you enjoyed this article you can [follow me](https://twitter.com/iain_freestone) on Twitter where I regularly post bite size tips relating to HTML, CSS and JavaScript.
Picking the Right Distributed Database [Create: Data]
Tags: database, showdev, news
Published: 2020-11-27 15:31:34

## "In God we trust, all others must bring data"
[William Edwards Deming](https://en.wikipedia.org/wiki/W._Edwards_Deming)

Well, Microsoft is bringing to you, **Data Week** 🙌 A celebration of Data & Data Technologies, running throughout the week, starting December 7, 2020!

### It kicks off with **Create: Data**, a completely FREE online event.

#### Register at https://aka.ms/createdata !

![](https://media.giphy.com/media/QYSgo7te5uhhZjz155/giphy.gif)

### Been wondering which database to pick for your next project/product?

[Tim Berglund](https://twitter.com/tlberglund) (who by the way, I admire a lot!) from Confluent will be joining me in a conversation about "Picking the Right Distributed Database". Databases are a critical part of any business. But, how do you pick the right one given the multitude of options at your disposal and new ones coming up quite frequently. Should you stick to good-old RDBMS, opt for NoSQL variants, or go multi-model? Is there really a right answer?

![](https://dev-to-uploads.s3.amazonaws.com/i/04xyc632qs950md76yc4.jpeg)

### Wait, that's not all!

Check out what's in store for the entire week 
in this post by [Adi Polak](https://twitter.com/AdiPolak) which covers the complete agenda!

{% link https://dev.to/azure/calling-out-all-data-nerds-49if %}

![](https://media.giphy.com/media/J2aYPy0Fd8oPNITB6u/giphy.gif)

Want to keep track of these events and conversations? Follow [@MicrosoftCreate](https://twitter.com/MicrosoftCreate) on Twitter!
Firebase bulk updates with FireDrill
Tags: firebase, nocode, angular, opensource
Published: 2020-11-27 15:06:40

---
title: Firebase bulk updates with FireDrill
published: true
description: Bulk updating in Firebase without writing scripts
tags: #firebase #nocode #angular #opensource
//cover_image: https://res.cloudinary.com/practicaldev/image/fetch/s--OMrJpruL--/c_imagga_scale,f_auto,fl_progressive,h_420,q_auto,w_1000/https://thepracticaldev.s3.amazonaws.com/i/571uzee2ghyk3axyyslm.png
---

Ever want to update a bunch of documents in your Firebase collection(s)? Usually you have to write a custom script to do a mass update, but with a new feature in [FireDrill](https://github.com/scottlepp/fire-drill) you can now do batch updates without writing any code. Let's take a look.

First, run your query to get the documents you want to update. We've also added text filtering so you can perform compound filters! Here we are querying the **track** collection and applying some filters.

![Firedrill filtering](https://dev-to-uploads.s3.amazonaws.com/i/adwyfq76hqlryankn17o.png)

Now that we have our documents we want to update, lets update them.

Open the hamburger menu on the right and select **Update Results**.

![Update Results](https://dev-to-uploads.s3.amazonaws.com/i/nzjnkia6nmy3cn7720ay.png)

Now we see a dialog. Here we can add a new field/value or update an existing field.  Click the **Add Field** button. Enter a new field/value or enter an existing field name and value you want to update.

![Add Field](https://dev-to-uploads.s3.amazonaws.com/i/0lnnqopiyv14medzqrdi.png)

Now click **Save**. Boom! All documents (within this filter and limit) have been updated!

If you like the new bulk updating and text filtering, please let me know by adding a star to the [Github repo](https://github.com/scottlepp/fire-drill). Thanks!
What do you think about 1MB.club?
Tags: watercooler, discuss
Published: 2020-11-27 14:29:46

[1MB.club](https://1mb.club) is a website created by [Bradley Taunt](https://github.com/bradleytaunt/) listing other websites, where your website is added to the list if it weights less than 1MB.

What do you think of this type of index?

*1M Club was [shared](https://news.ycombinator.com/item?id=25151773) a few days ago on Hacker News, and therefore has gained popularity quite quickly.*
How to start learning a new programming language [Part 1]
Tags: swift, swiftui, gettingstarted, process
Published: 2020-11-27 14:28:06

---
title: How to start learning a new programming language [Part 1]
published: true
description: How to start something new
tags: Swift, SwiftUI, GettingStarted, Process
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/xb25uszs2ijxmtk06iju.jpg
---

## The Problem
For years I was struggling with learning a new programming language. 
In my day job I'm a software developer for medical devices. That means writing software for a device which should never fail. The programming languages of choice are C and C++ for the embedded systems I'm working on and the product lifecycle is long - 10 to 15 years. 

So I'm stuck in my roots, programming with the same languages and writing even more documentation of the software I code.

## Getting started?
Now, how do I get to start on a new programming language? 

Last week I was sitting in front of my computer and looked on my desktop. The last months had taken its toll. The desktop was cluttered in files from 3d printing, pictures and files for different private projects. 

There it was! A problem I want to solve. 

__A program to sort away my files. A program which can help me and other people to clean their computer.__

## Getting started! 
This problem allows me to add one more point I always wanted to learn to my todo list. Implementing an UI. In my day job I did only some small tweaking to user interfaces, never building one from the ground up.

Starting goals:

- Use Swift for the application
- Use SwiftUI for the user interface
- sort files by filetype to different destinations
- move / copy these files from one location to the other

Nothing more - just the minimal working solution to my problem. No fancy features, no fancy UI.

## How to get started
In conclusion - you can start learning a language by doing tutorials. You will learn a lot, especially when you are new to programming.
But you have to jump into the deep end sooner or later. A tutorial can only teach you the syntax and how small parts of the language work. Making an application on your own is a different story.

__Find a problem you want to be solved. Break it down to smaller pieces you can solve and start from there.__

Don't be afraid to fail. The internet is full of sites helping you solve the problem you may find on your way!

The first versions of the [application](https://github.com/JayFiDev/StoreAway) are already done, getting more features over time. I want to continue this as a small series. Publishing more stories in the next weeks on my journey to learn a new programming language and solve my problem.

Picture: Image by Mariann Szőke from Pixabay - Thank you!
#DevHack: Dismiss messaging extension dialog in MS Teams
Tags: typescript, javascript, microsoft, microsofteams
Published: 2020-11-27 14:23:19

Currently, I am developing my first "real" Microsoft Teams app with SharePoint Framework. In this app, I am making use of the new messaging extension capability.

> Info: [what are messaging extensions?](https://docs.microsoft.com/en-us/microsoftteams/platform/messaging-extensions/what-are-messaging-extensions)

While developing a form in my extension, I wanted to cancel and submit a button. When I started implementing the cancel button, its `onClick` event, I was lost in how to close the dialog. 

While going through the documentation, I found that you can do this by calling `microsoftTeams.tasks.submitTask()`. It was a bit hidden away on this page: [task modules](https://docs.microsoft.com/en-us/microsoftteams/platform/task-modules-and-cards/task-modules/task-modules-tabs#htmljavascript-taskinfourl).

In your SharePoint Framework code, it looks as follows:

```typescript
if (this.context.sdks.microsoftTeams) {
  // Close the current dialog
  this.context.sdks.microsoftTeams.teamsJs.tasks.submitTask();
}
```

*Happy MS Teams development*

First published on: [https://www.eliostruyf.com/devhack-dismiss-messaging-extension-dialog-ms-teams/](https://www.eliostruyf.com/devhack-dismiss-messaging-extension-dialog-ms-teams/)
Wasp - a DSL for building web apps with less boilerplate! Integrates with React/Node.js/Prisma.
Tags: react, node, webdev, javascript
Published: 2020-11-27 14:08:42

Hi Dev.to! Together with my brother I've been working on **Wasp - a declarative language for building full-stack Javascript web apps with as little boilerplate as possible.** It is open-source and integrates with React/Node.js/Prisma.

**We just released Alpha and are looking for testers and contributors!**

Check it out here: https://wasp-lang.dev/
Github repo: https://github.com/wasp-lang/wasp
Join our Discord server: https://discord.gg/rzdnErX

Thanks for any feedback and comments!
Apply for Blockdegree Scholarship.
Tags: blockchain, xinfin, xdc
Published: 2020-11-27 14:02:11

Students or Blockchain enthusiast interested to learn blockchain can utilize this opportunity by applying for scholarships on Blockdegree. Learning is a never ending process, get started and lets build interesting #DApps together.
Apply here: https://docs.google.com/forms/d/1Fp_BfX8suyo1-HbceFCkiIeHFcJw3ffSeiI72oVj-hA
It’s Black Friday 2020! 🔥
Tags: vue, webdev, javascript
Published: 2020-11-27 13:55:50


Get 40% off a premium Vue School subscription. The Black Friday discount is the lowest price you can get during the next 365 days!

You’ll learn Vue.js and modern, cutting-edge front-end technologies from core-team members and industry experts with premium tutorials and video courses.

Enjoy 40% off this Black Friday  👇
https://vueschool.io/sales/blackfriday
¿Qué Son Las Bolsas De Polipropileno?
Published: 2020-11-27 13:50:26

El polipropileno es un termoplástico que fue creado por primera vez en 1954. Desde bienes de consumo (¡como las bolsas reutilizables!) hasta automóviles, e incluso muebles, el polipropileno es uno de los 3 polímeros más utilizados hoy en día! No es sorprendente que también sea uno de los plásticos más baratos, por lo que se fabrica tanto de él, ¡incluyendo las bolsas reutilizables!

Los <a href="https://www.maxisacosperu.com/">costales de polipropileno</a> son usados en varias industrias, minera, pesquera, agrícola, etc

*Dato divertido: la fórmula química del polipropileno es (C3H6) n. Adelante… ¡vaya sus amigos! *
Falling Down — The Reality of Developer Burnout
Tags: technology, work, mentalhealth, softwaredevelopment
Published: 2020-11-27 14:28:42

---
title: Falling Down — The Reality of Developer Burnout
published: true
date: 2020-11-27 13:36:54 UTC
tags: technology,work,mentalhealth,softwaredevelopment
canonical_url: https://medium.com/better-programming/falling-down-the-reality-of-developer-burnout-59c9079446ef
---

[![](https://cdn-images-1.medium.com/max/1920/1*N1XqIOifLrUrHxkeQY-qpg.jpeg)](https://medium.com/better-programming/falling-down-the-reality-of-developer-burnout-59c9079446ef?source=rss-8f1b0c5dd7cc------2)

Learn how to identify it and stop it in its tracks

[Continue reading on Better Programming »](https://medium.com/better-programming/falling-down-the-reality-of-developer-burnout-59c9079446ef?source=rss-8f1b0c5dd7cc------2)
You don’t  have to build a to-do app ...

Tags: typescript, svelte, gamedev, showdev
Published: 2020-11-27 13:15:58

... to learn new things!

That’s what I thought to myself when I recently hopped onto the Svelte bandwagon to see what it had to offer!

I started to overhaul my [website](https://s1h.org "s1h.org website") and my first impressions were amazing! Fronted development is pretty opinionated (as software development is in general), but for me, Svelte just hit the sweet spot!

It comes with batteries included to get quite many things done, but also gets out of your way when integrating 3rd-party tools.

Naturally, I wanted to build another thing to see whether my first impression was right. Based on my [recent blog post](https://blog.s1h.org/colyseus-multiplayer-game/ "Tetrolyseus blog post"), I re-implemented a co-op multiplayer Tetris clone.

It uses:

- [Svelte](https://svelte.dev "Svelte website")
- [Tailwind CSS](https://tailwindcss.com "Tailwind CSS website")
- [nes.css](https://nostalgic-css.github.io/NES.css/ "nes.css website")
- [svelte-routing](https://github.com/EmilTholin/svelte-routing "svelte-routing repo")

![Game on!](https://dev-to-uploads.s3.amazonaws.com/i/h8knuh21rx4dmq3d6a5w.jpeg)

Thanks to GitHub Actions it is automatically [deployed to my server](https://blog.s1h.org/github-actions-ssh-deploy/ "GitHub Actions deploy post").

My first impression of Svelte remained intact, it’s been a joyful experience to re-implement the game!

## How to play 

There are two different game modes:

- **Team-Blocks**: Multiple playing field overlap. Every player has its own and only those rows completed on *every* field are cleared.
- **Tetrolyseus**: Two players share a single game. One player can move blocks, the other one rotates.

Open games are either join via game lobby or directly via link. Private games won't show up in the lobby, so you can privately invite your teammates via link!

Once everybody set itself ready, the game is on!

Blocks are steered via keyboard input, but thanks to some media queries, there are on-screen controls on touch devices!

## Where to play?

It’s available at: [https://multris.s1h.org](https://multris.s1h.org "Multris website")

Have fun!
Ansible AWS EC2 Dynamic Inventory Plugin
Tags: aws, ansible, devops
Published: 2020-11-27 13:09:17

- Ansible can pull inventory information from dynamic sources by various dynamic inventory plugins.
- One of them is the aws_ec2 plugin, a great way to manage AWS EC2 Linux instances without having to maintain a standard local inventory.

Here is just a quick example of how to use it.

**1. Install aws_ec2 ansible plugin**
[amazon.aws.aws_ec2 – EC2 inventory source](https://docs.ansible.com/ansible/latest/collections/amazon/aws/aws_ec2_inventory.html)
Note: Uses a YAML configuration file that ends with aws_ec2.(yml|yaml)

**2. Setup ``ansible.cfg``**
```
[defaults]
enable_plugins = aws_ec2
host_key_checking = False
pipelining = True
remote_user = ec2-user
private_key_file=/pem/key-pem
```

**3. Create inventory `my_aws_ec2.yml` file to group target**
Filter here is tag:name and state of the instance (running)
```
---
plugin: aws_ec2
aws_profile: default
regions:
  - us-east-1
filters:
  tag:Name:
    - dev-*
    - share-resource
    - hotfix
  instance-state-name : running
keyed_groups:
  - prefix: env
    key: tags['env']
  - prefix: dev
    key: tags['ssm']
```

**4. Check the list and the host group**
```
$ ansible-inventory -i my_aws_ec2.yml --list
    "all": {
        "children": [
            "aws_ec2",
            "env_dev",
            "dev_ssm",
            "ungrouped"
        ]
    },
    "aws_ec2": {
        "hosts": [
            "ec2-111-111-111-111.us-east-1.compute.amazonaws.com",
            "ec2-11-111-111-112.us-east-1.compute.amazonaws.com",
            "ec2-11-111-111-113.us-east-1.compute.amazonaws.com",
            "ec2-11-111-111-114.us-east-1.compute.amazonaws.com",
            "ec2-11-111-111-115.us-east-1.compute.amazonaws.com",
        ]
    },
    "env_dev": {
        "hosts": [
            "ec2-111-111-111-111.us-east-1.compute.amazonaws.com",
            "ec2-11-111-111-112.us-east-1.compute.amazonaws.com",
            "ec2-11-111-111-113.us-east-1.compute.amazonaws.com",
            "ec2-11-111-111-114.us-east-1.compute.amazonaws.com",
            "ec2-11-111-111-115.us-east-1.compute.amazonaws.com",
        ]
    },
    "dev_ssm": {
        "hosts": [
            "ec2-111-111-111-111.us-east-1.compute.amazonaws.com"
        ]
    }
```

**5. Now send the task to the expected group**
The task here is to update the env files to to env_dev group. File name and value are parsed from ansible host and item list (Ansible echo into file)

``update_env.yaml``
```
---
- hosts: all
  become: yes
  tasks:
    - name: Get hostname
      command: echo {{ ansible_hostname.split('-')[1] }}
      register: hostname

    - name: Update env files
      become: yes
      become_user: root
      shell: |
        echo "AGENT_ID={{ hostname.stdout }}-{{ item }}::" >> "/opt/workdir/{{ item }}.env"
      with_items:
        - app
        - pet
        - gate
        - api
      tags: runcmd
      register: result

    - name: Print output
      debug:
        var: result
```

**Run**
```
$ ansible-playbook update_env.yaml -i my_aws_ec2.yml --limit env_dev -vv
```
Daily Developer Jokes - Friday, Nov 27, 2020
Tags: jokes, dailydeveloperjokes
Published: 2020-11-27 13:00:26

---
title: "Daily Developer Jokes - Friday, Nov 27, 2020"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
cover_image: "https://private.xtrp.io/projects/DailyDeveloperJokes/thumbnail_generator/?date=Friday%2C%20Nov%2027%2C%202020"
published: true
tags: #jokes, #dailydeveloperjokes
---

Generated by Daily Developer Jokes, a project by [Fred Adams](https://xtrp.io/) ([@xtrp](https://dev.to/xtrp) on DEV)

___Read about Daily Developer Jokes on [this blog post](https://xtrp.io/blog/2020/01/12/daily-jokes-bot-release/), and check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/).___
### Today's Joke is...
![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e1258ef9deee.png)

---
*Have a joke idea for a future post? Email ___[xtrp@xtrp.io](mailto:xtrp@xtrp.io)___ with your suggestions!*

*This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit.*

<!-- 
Joke text:
___Q:___ What did the proud React component say to its child?

___A:___ I've got to give you props
 -->
Ruby vs Python. Short comparison
Tags: ruby, python, django, rails
Published: 2020-11-27 12:42:38

Today we can call Python and Ruby two of high-level languages of the latest generation. They are both well structured, straightforward, and provide a developer the opportunity to do quickly development instead of syntax complexity and strict hierarchy.
We wrote a short article to compare Ruby and Python by philosophy, typical projects, use cases, libraries, reusability and advantages.

Read <a href="https://exceed-team.com/tech/ruby-python">the original source of our Ruby and Python comparison</a> and leave your comments under this post.