teleren/devto huggingface dataset:
Python Dictionaries.
Tags: python, programming, flask, django
Published: 2021-08-11 18:13:25

Hello all, before we dive into today's article. I would like to inform you that I have been attending a four week python bootcamp organised by Data Science East Africa and Lux Tech Academy.
So far I have learnt all the basics of python some of which I have been writing about here. Additionally, we have also been introduced to Flask and FAST API and this week we shall be handling data science.

Now back to today's article.
#Dictionaries.
Dictionary in Python is an ordered collection of data values, used to store data values like a map, which, unlike other Data Types that hold only a single value as an element, Dictionary holds key:value pair. Key-value is provided in the dictionary to make it more optimized.
* Creating a dictionary
You can use the dict() function to create an empty dictionary in python.
```python
   # creating an empty dictionary
  dictionary = dict()
  print(dictionary)
  {}
```
The curly brackets represent an empty dictionary. To add an item to the dictionary we use the square brackets.
```python
   >>>dictionary['one'] = 'uno'
```
The above piece of code creates an item that maps from the key 'one' to the value 'uno'.
Printing the dictionary again gives a key-value pair with the key and value. `{'one':'uno'} `.
We can continue adding more items to the dictionary using the method demonstrated above.
```python
   >>> dictionary = {'one': 'uno', 'two': 'dos', 'three': 'tres'}
   >>> print(dictionary)
   {'one': 'uno', 'three': 'tres', 'two': 'dos'}
```
* Accessing the items in the dictionary.
The order of items in a dictionary is not the same. You may get a different arrangement when you type the same items in the above demonstration example.
The elements in a dictionary are not indexed meaning we can not access them via indices, instead we use keys as a 'substitute' for indices to access the values against it.
```python
   >>>print(dictionary['one'])
      'uno'
```
From above, we see that 'uno' is returned because we used it's key 'one' to access it.
To know the number of key-value pairs we use len() function.
```python
   >>>len(dictionary)
      3
```
The _in_ operator can be used to tell whether something appears as a key in the dictionary.
```python
>>>'one' in dictionary
    True
>>> 'uno' in dictionary
    False
```
To check whether something appear as a value, you can use the **method** _values_ to return a list of values and them use the _in_ operator to find it.
```python
   >>>values  = list(dictionary.values())
   >>> 'uno' in values
      True
```
* Dictionaries as counters.
Suppose we want to count the number of times a letter appears in a word, we can loop through and increment our counter every time the letter is found.
```python
  word = 'brontosaurus'
  d  = dict()
  for o in word:
      if o not in d:
         d[0] = 1
     else:
        d[0] = d[0] + 1
print(d)
# we get {'o':2}
```
This article is being updated.
7 cases where we can use HTML instead of CSS
Tags: html, css
Published: 2021-08-11 17:55:16

##1 Hide an element

Yes! you read it right. We can hide an element using HTML. Using the `hidden` attribute we can hide an element.
Example-

```
<p hidden> Hello! I am a hidden paragraph </p>
```

##2 Word Break

We can break a word at any position we want by using the `<br>` or `<wbr>` tag according to our usecase.
Example-

```
<p> Hello! I am a <br> broken text </br> </p>

```


##3 Accordion
We can create an accordion without writing a line of css or javascript. Using the HTML `<details>` and `<summary>` tag we can create an accordion.

Example-
``` 
<details>
    <summary>Accordion title</summary>
    Content you want to show/hide.
</details>

```

##4 Progress Bar
Using the HTML `<progress>` tag we can show a progress without css or javascript 

Example-
``` 
<progress id="file" value="32" max="100"> 32% </progress>

```

##5 Color Picker

Using the HTML `<input type="color">` tag we can show a color picker and get its value.

Example-
``` 
  <input type="color" value="#ff0000">

```

##6 Delete/Underline Text

Using the HTML `<del>` & `<ins>` tag we can strike text and underline text.

Example-
``` 
<p>My name is <del>jyotish</del> <ins>jyotishman/ins>!</p>

```


##7 Center  text

We can center a text without using CSS. Using the HTML `align` attribute we can give values like- left, center or right.

Example-

```
<p align="center">Hello! I am a center text </p>
```

If you liked my content you can follow me on twitter for more such content-

https://twitter.com/frontend_jsx
Season 6 of DevDiscuss is here!
Tags: discuss, podcast
Published: 2021-08-11 17:53:09

---
title: Season 6 of DevDiscuss is here!
published: true
description: Listen to the season premiere of DevDiscuss!
tags: discuss, podcast 
series: DevDiscuss Season 6
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/ih1kvo3fts4vao4pir61.png
---

[DevDiscuss](https://dev.to/devdiscuss) is back with all new episodes for season 6! On our flagship podcast, we tackle the burning questions that impact all our lives as developers 🔥 

We hope you enjoy the season premiere all about the many human factors involved in engineering!

{% podcast https://dev.to/devdiscuss/s6-e1-engineering-the-human-component %}

Shoutout our hosts this week @ben (Creator of DEV & Chief Creative Officer @ Forem) and @molly (Head of Engineering at Forem). And a huge thanks to our guests in this episode:  

- [Nick Stenning](https://twitter.com/nickstenning), Site Reliability Engineer at Microsoft, working on Azure
- [Laura Maguire](https://twitter.com/lauramdmaguire), researcher at Jeli, an incident analysis platform.

---

_You can [follow DevDiscuss](dev.to/devdiscuss) to get episode notifications and listen right in your feed_ — or subscribe on your platform of choice! Plus, if you leave us a review, we'll send you a free pack of thank-you stickers. Details [here](https://airtable.com/shr8oKAIMZgdYnBxx). 

## Quick Listening Links
- [Apple Podcasts](https://podcasts.apple.com/us/podcast/s6-e1-engineering-the-human-component/id1513053883?i=1000531690932)
- [Spotify](https://open.spotify.com/episode/7dXzIu02mrmOA3vwT7At3U)
- [Google](https://podcasts.google.com/feed/aHR0cHM6Ly9mZWVkcy5kZXZwb2RzLmRldi9kZXZkaXNjdXNzX3BvZGNhc3QueG1s/episode/aHR0cHM6Ly9kZXZwb2RzLmRldi9wb2RjYXN0cy9kZXZkaXNjdXNzLzQy?sa=X&ved=0CAQQkfYCahcKEwjo1KLZuanyAhUAAAAAHQAAAAAQCA)
- [Listen Notes](https://www.listennotes.com/podcasts/devdiscuss-dev-xtQvoDylAUg/)
- [TuneIn](https://tunein.com/podcasts/Technology-Podcasts/DevDiscuss-p1324596/?topicId=165050817)
- [RSS Feed](http://feeds.codenewbie.org/devnews_podcast.xml)
- [DEV Pods Site](http://devpods.herokuapp.com/podcasts/devdiscuss/episodes/177)

---
_Acknowledgements_ 
- _@levisharpe for producing & mixing the show_
- _Our season six sponsors: [CockroachDB](cockroachlabs.com/devdiscuss) & [Scout APM](https://www.scoutapm.com/devdiscuss)!_
Why I recommend first learning C, not Python
Tags: c, beginners
Published: 2021-08-11 17:49:55

Whenever a beginner asks me what is the best programming language to start with I always am saying: "C". Here is why.

### Reason 1. C is more low level
C is a low level language, unlike Python or JavaScript. What that means is that it is much closer to Assembly than pretty much any other language. Because of that, you often need to do a lot of memory management and write a lot more algorithms than in other languages. Thanks to that, rather than memorizing a bunch of functions and methods, a beginner will learn how to actually write them. That will help them learn how to write algorithms a lot faster than it would if they would learn some other language.

### Reason 2. C is more complex
Undoubtedly, C code is harder to write, harder to read and even harder to set up than Python code. On one hand that's kinda bad because a beginner may eventually give up after failing to do something, but on the other hand after mastering C they won't have to really learn any other programming language. They'll understand how everything works and all they will need to do to master another programming language will be to learn the syntax. Which means, that although learning C may take quite some time, after doing this it'll be really easy and fast to learn any other programming language. Meanwhile, if a beginner will learn a high level language first, it'll be hard for them to learn anything as low level as C.

### Reason 3. C is faster
After learning a high level language like Python a beginner will probably stick to it and continue developing applications using that language. However, there is a major downside of Python and other interpreted languages - they are a lot slower. However, after learning C a beginner will have two choices:
- Continue using C/languages similar to C for development
- Quickly learn some high level language and use it instead

So, if speed and performance matters to them then they can just go ahead and start the development. And if it doesn't, then they can learn a language like Python (that won't take much time because it is a lot easier) and start development with it instead.

Thus, C is giving the beginner more choice, which of course is a good thing.

### Conclusion
So, these were my 3 reasons on why I always am recommending learning C as the first language. Learning C gives the beginner a solid base, thanks to which it will be easier to advance in their programming career.

Leave a comment if you disagree with me - I would love to hear opinion of other people.

Thanks for reading!
WHAT IS THE __MACOSX FOLDER | The stranger you see in your extracted zip folder.
Tags: todayilearned, pc, mac, windows
Published: 2021-08-11 17:04:29

To put simply, the `__MACOSX` folder is a resource fuck, oh sorry, **a resource fork**. This folder is always hidden in the mac OS, and it is also created there. _The Mac OS, uses the resource fork to store structured data along with the unstructured data stored within the data fork_ (and what does that mean? I have no idea, ask Wikipedia, that's whom I'm quoting).

To the Windows and Linux users, it is a resource fuck, because it's useless to them. They usually come around whenever one downloads and extracts a file that has been zipped by a mac system. So the next time you see the strange folder, `__MACOSX`, feel free to hit the delete button. (_for mac users, you won't even get to see it_ 😜)

![kicking out __MACOS folder cartoon](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k3ebns92urlkjmhq5c5x.jpeg)
Getting started with flask
Published: 2021-08-11 17:02:25

##What I have learnt and gained since day one;
Let me begin by thanking Lux-academy for this great opportunity that was given to me and to us as a whole.
Sincerely speaking this bootcamp has further enlightened me about the real world. And it has really made theory at university practical. Thanks to LuX-academy and in particular thanks to the Instructor-Haruna for the tireless effort given in!

###What I have learnt.
1. Python basics
2. Use of GitHub
3. A clue on the data-types and algorithms

###Python basics:
Under this I have learn a lot of things which among others include the following;
Exactly what python is, lists, tuples, dictionaries, sets and extra.
###Use of GitHub.
I have atleast known how to have my work on GitHub from my local machine. I have also got used to use of commands which looked hard and complicated before joining the bootcamp! Lux-academy thanks!


#Getting started with flask.
Flask is a web framework that provides libraries to build lightweight web applications in python. It is developed by Armin Ronacher who leads an international group of python enthusiasts (POCCO).

Flask is a web framework that provides libraries to build lightweight web applications in python. It is developed by Armin Ronacher who leads an international group of python enthusiasts (POCCO). It is based on WSGI toolkit and jinja2 template engine. Flask is considered as a micro framework.

##How about WSGI and Jinja2 template??
###What is WSGI?
It is an acronym for web server gateway interface which is a standard for python web application development. It is considered as the specification for the universal interface between the web server and web application.

###What is Jinja2?
Jinja2 is a web template engine which combines a template with a certain data source to render the dynamic web pages.

##Flask Environment Setup
To install flask on the system, we need to have python 2.7 or higher installed on our system. However, we suggest using python 3 for the development in the flask.

###Install virtual environment (virtualenv)
virtualenv is considered as the virtual python environment builder which is used to create the multiple python virtual environment side by side. It can be installed by using the following command.
``` python
$ pip install virtualenv  
```
Welcome Thread - v137
Tags: welcome
Published: 2021-08-11 16:59:51

---
title: Welcome Thread - v137
published: true
description: Welcome to DEV! A thread of hellos and intros.
tags: welcome
canonical_url: 
---

![Donkey from Shrek smiling](https://media.giphy.com/media/KEf7gXqvQ8B3SWnUid/giphy.gif)

### Welcome to DEV!

1. Leave a comment below to introduce yourself! You can talk about what brought you here, what you're learning, or just a fun fact about yourself.

2. Reply to someone's comment, either with a question or just a hello. 👋 

**Great to have you in the community!**
How to use Excel Box and Whiskers Chart in Excel 365?
Tags: useexcelboxandwhiske
Published: 2021-08-17 03:46:21

---
title: How to use Excel Box and Whiskers Chart in Excel 365?
published: true
date: 2021-08-11 16:39:03 UTC
tags: UseExcelBoxAndWhiske
canonical_url: https://geekexcel.com/how-to-use-excel-box-and-whiskers-chart-in-excel-365/
---

The **Box and Whiskers chart** is used in analytics to **visualize** the **mean, median, upper bound, and lower bound of a data set**. It comes under the **statistical chart’s category**. In this chapter, we will show the simple steps to **Use Excel Box And Whiskers Chart In Excel 365**. Let’s step into this article!! Get an official version of ** MS Excel**  from the following link: [https://www.microsoft.com/en-in/microsoft-365/excel](https://www.microsoft.com/en-in/microsoft-365/excel)

## Create a box and whisker plot

- You need to **enter the data** in the Excel spreadsheet.
- For instance, we have created **sample items**.

![](https://geekexcel.com/wp-content/uploads/2021/08/items.png)<figcaption>List of items</figcaption>

- Then, you have to **select the data** in Excel worksheet.
- Now, you need to go to the **Insert tab**.
- After that, you have to click on the **Statistical Charts** under the **Chart** section.

![](https://geekexcel.com/wp-content/uploads/2021/08/click-on-statistical-chart.png)<figcaption>Click on Statistical Charts</figcaption>

- Finally, you need to select **Box and Whiskers chart.**

![](https://geekexcel.com/wp-content/uploads/2021/08/Click-on-Box-and-whiskers-chart-1024x411.png)<figcaption>Click on Box and Whiskers chart</figcaption>

## Bottom-Line:

From this tutorial, you can get some clarification on how to **Use Excel Box And Whiskers Chart In Excel 365**. If you have any **doubts** regarding this topic or any other excel VBA-related topic, ask in the **comment** section below.

Thank you so much for visiting  **[Geek Excel](https://geekexcel.com/)!! **If you want to learn more helpful formulas, check out [**Excel Formulas**](https://geekexcel.com/excel-formula/) **!!**

**Read Ahead:**

- **[Excel Formulas to Randomly Assign Data to Groups ~ Easy Tricks!!](https://geekexcel.com/excel-formulas-to-randomly-assign-data-to-groups/)**
- **[Charts with floating up-down bars in Excel 365 – Easy Tricks!!](https://geekexcel.com/charts-with-floating-up-down-bars-in-excel-365-easy-tricks/)**
- **[Excel Formulas to Test All Cells in Range are Blank ~ Easy Guide!!](https://geekexcel.com/excel-formulas-test-all-cells-in-a-range-are-blank/)**
- **[Excel Formulas to Find the Address of First Cell in a Range ~ Easily!!](https://geekexcel.com/excel-formulas-to-find-the-address-of-first-cell-in-a-range/)**
- **[Creating Quarterly Sales Chart by Clustered Region in Excel 365!!](https://geekexcel.com/creating-quarterly-sales-chart-by-clustered-region-in-excel-365/)**
#100daysofcode [ Day - 01 ]
Tags: 100daysofcode, programming, javascript, webdev
Published: 2021-08-11 16:34:53

#100daysofcode [ Day - 01 ]
Today I've learned about Variables, Conditions & Function. 
And I have made a function to Check Even or Odd Numbers.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/awns1bzk73souicohxxv.png)
Create Sounds With Python Package Pydub
Tags: python, programming, codenewbie, 100daysofcode
Published: 2021-08-11 16:02:35

Python Programming Language can be used to create and play music in many ways. Python Experts gives us ready-made different Python Packages and Python Modules that help us to easily create different music and help us play different sounds.
more here at https://www.alixaprodev.com/2021/08/create-sounds-with-python-package-pydub.html
Introduction to React testing library
Tags: react
Published: 2021-08-11 15:59:13

---
title: Introduction to React testing library
published: true
description: This article gives an introduction to React testing library.
tags: #reactjs
//cover_image: https://direct_url_to_image.jpg
---

React testing library has replaced Enzyme as the new standard for testing React components. It renders components to the virtual DOM, queries for an element in the DOM and then makes assertions on that element. 

```javascript
import { render, screen } from '@testing-library/react';
import App from './App';

test('A very basic test', () => {
  render(<App />);
  const textElement = screen.getByText(/hello world/i);
  expect(textElement).toBeInTheDocument();
});
```

I really like the way we structure tests with React testing library. Render the component, get some element, assert on the element. Very intuitive.

Whenever we test behaviour like button clicks, we make sure of the user-event library.

```javascript
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import App from './App';

test('Button click', () => {
  render(<App />);
  const buttonElement = screen.getByRole('button', { name: /click me/i });
  userEvent.click(buttonElement);
  const textElement = screen.getByText(/some text/i);
  expect(textElement).toBeInTheDocument();
});
```

In the above test, we click a button and hopefully some new text appears in the screen.

I wrote an [elaborate article](https://vijayt.com/post/functional-testing-using-react-testing-library-and-jest/) covering more scenarios. Love to hear your feedback on it.
Best React State Management Libraries
Tags: react, computerscience, javascript, programming
Published: 2021-08-11 15:50:02

The number of state management libraries available in React at the time of writing this article is tremendous. As a result, choosing the <b>Best state management</b> library to use for a certain project and not getting swamped by the React community’s commotion and headlines is a critical aspect in supporting the creation of an application.

Some programmers use MobX to solve the problem, while others combine them with application <b>state management tools</b> such as Redux or the recently released Recoil. In this article, we will talk about some of these React State Management Libraries

<h2>Best React State Management Libraries in 2021</h2>

1. Redux
2. MobX
3. Recoil
4. Akita
5. Hookstate
6. XState

<h3>Wrapping Up With</h3>

Some programmers use MobX to solve the problem, while others combine them with application state management tools such as Redux or the recently released Recoil. In this article, we will talk about some of these React State Management Libraries

Refrence - <a href="https://codersera.com/blog/best-react-state-management-libraries-in-2021/">Best state management library</a>
HTML Emoji
Tags: html, webdev, codenewbie, css
Published: 2021-08-11 15:46:11

Emojis are characters from the UTF-8 alphabet.

Emojis are characters, they can be copied, displayed, and sized just like any other character in HTML.

![HTML Emoji Code](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eq0cimbne4eaa34r7ajg.png) Output:
![Emoji Output](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eg5n29c8pagdgbgi6xmp.PNG)
Preview:
{% codepen https://codepen.io/ejaazkhan/pen/OJmdOBq %}

| Emoji      | Value|
| ----------- | ----------- |
| ⌚      | `&#8986;`       |
| ⌛ |	`&#8987;`|
|❌	| `&#10060;` |
|🗾	| `&#128510;`|
|🗿	| `&#128511;`|
|😀	| `&#128512;`|
|😁	| `&#128513;`|
|😂	| `&#128514;`|
|😃	| `&#128515;`|
|😄	| `&#128516;`|
|😅	| `&#128517;`|

For a full list:- [HTML Emoji Reference](https://www.w3schools.com/charsets/ref_emoji.asp).

Checkout My [Blog &#128512;](https://beginners-developer.blogspot.com)
How to install Elasticsearch 5.6 and other such older versions
Tags: elasticsearch, help, todayilearned
Published: 2021-08-11 15:43:52

**Elasticsearch** 5.6 is now [EOL](https://www.elastic.co/guide/en/elasticsearch/reference/5.6/release-notes-5.6.10.html). 

Which begs the question why I'm **writing** this blogpost. Not all software runs on the _bleeding edge_ of it's dependencies. People have to run and maintain legacy products. It's better not to use dependencies which are EOL because you're missing out on security and performance updates.

I had to install Elasticsearch 5.6 and it took me a while to install it since the oldest version of Elasticsearch which **Homebrew**(I use a mac) carries is 6. This blogpost is for the next person who runs into a similar issue. 

So yes we're going to manually install Elasticsearch and it's dependencies.


**Steps to install Elasticsearch**
- Install Java
- Get Elasticsearch
- Configure path in your shell
- Run Elasticsearch


**Install Java**
- Java8 works just fine with Elasticsearch 5.6.
- So we'll go ahead and install that
  - `brew install openjdk@8`
  - This [blogpost](https://mkyong.com/java/how-to-install-java-on-mac-osx/) covers Java installation pretty in-depth, feel free to refer it.

**Get Elasticsearch**
- Download [Elasticsearch](https://www.elastic.co/downloads/past-releases/elasticsearch-5-6-0) from the official site.
- Extract elasticsearch from the zip and keep it in a folder and track the folder.

**Configure the environment variables as shown:**
```
export ES_HOME=~/bin/elasticsearch-5.6.16
export JAVA_HOME=/usr/local/opt/openjdk@8/libexec/openjdk.jdk/Contents/Home
export PATH=$ES_HOME/bin:$JAVA_HOME/bin:$PATH
```
- Once the environment variables are configured refresh the shell.

**Run Elasticsearch**

```
elasticsearch
```
---

Blogposts referred:
-  https://chartio.com/resources/tutorials/how-to-install-elasticsearch-on-mac-os-x/
-  https://mkyong.com/java/how-to-install-java-on-mac-osx/

Photo by <a href="https://unsplash.com/@markuswinkler?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Markus Winkler</a> on <a href="https://unsplash.com/s/photos/legacy?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a>