teleren/devto huggingface dataset:
The Legend of Data - Ep.2 - Pandas basics 1
Tags: python, datascience, beginners, tutorial
Published: 2020-06-09 22:59:37

---
title: The Legend of Data - Ep.2 - Pandas basics 1
published: true
description: Pandas is a superpower tool to handle data in Python. It lets you read and write from csv, xlsx and other file formats; lets you change the structure of the data, change the data types, aggregate data, joining data etc. In this episode, we will talk a bit about the internal of pandas DataFrames and some basic operations for reading and writing csvs, slicing DataFrames and changing data types.
tags: python, datascience, beginner, tutorial
---

Pandas is a superpower tool to handle data in Python. It lets you read and write from csv, xlsx and other file formats; lets you change the structure of the data, change the data types, aggregate data, joining data etc. In this episode, we will talk a bit about the internal of pandas DataFrames and some basic operations for reading and writing csvs, slicing DataFrames and changing data types.

If you have any questions or any suggestions about which Python or Data Science topics to cover, please leave your comment at my [Twitch channel](https://www.twitch.tv/cheukting_ho)

You can get the slide deck [here](https://slides.com/cheukting_ho/legend-data-pandas1/). The notebook that I used can be found [here](https://github.com/Cheukting/legend_data).
What do you use Netlify Functions for?
Tags: serverless, discuss, help
Published: 2020-06-09 22:35:52

I like to learn from people. Not by chance, some days ago I asked [dev.to](https://dev.to/) users to help me finding an [useful project to code for my family](https://dev.to/francoscarpa/what-can-i-build-for-my-family-5fbh) (I really appreciated all of the comments).

I’m here again to ask you what do you use Netlify Functions for. I have a personal website and I’m getting into this “functions” stuff. I already have experience with **Azure Functions**, but since my website is hosted on Netlify I want to take the most out of them, too. I’d really like to receive feedback from you! Do you use them for sending emails? Or maybe posting to Twitter? Or maybe asking for the weather forecast? Let me know!
🔥 Quick Tip: What's the benefit of using - Nullish Coalescing operator
Tags: javascript, tutorial, devtips, webdev
Published: 2020-06-09 22:14:43

On this simple trick, I'll show you the benefit of using `Nullish Coalescing - ??` instead of `OR - ||`.

```js
const user = {
  name: '',
  isDev: undefined,
  isHuman: false,
  age: 0,
};

// Using ?? operator
console.log(user.name ?? 'John Doe'); // => ''
console.log(user.isDev ?? false); // => false
console.log(user.isHuman ?? true); // => false
console.log(user.age ?? 20); // => 0

// ----
  
// Using || operator
console.log(user.name || 'John Doe'); // => 'John Doe'
console.log(user.isDev || false); // => false
console.log(user.isHuman || true); // => true
console.log(user.age || 20); // => 20
```

Notice in some cases with different values from `null` or `undefined` the operator `||` isn't get a wanted value.

Note: You can use this feature with babel or another compiler enabling the ES2020 features.

## Reference
- [TC39 Proposal Nullish Coalescing](https://github.com/tc39/proposal-nullish-coalescing)

---

Did you like it? Comment, share! ✨
Module not found: Can't resolve 'uuid/v4'

Tags: react, javascript
Published: 2020-06-09 22:12:04

I am a beginner in React programming and I was following this tutorial in Youtube: https://youtu.be/hQAHSlTtcmY and everything went well until it was required to install uuid library and after that when I run the page I get an error saying: "Failed to compile.

./src/App.js

Module not found: Can't resolve 'uuid/v4' in 'C:\Users\username\reactnative\src'" so can anyone help me fix this error? And also there are no other errors in the code and it's exactly the same as shown in the video!
Road to Genius: beginner #4
Tags: javascript, beginners, computerscience
Published: 2020-06-09 21:56:53

Each day I solve several challenges and puzzles from Codr's ranked mode. The goal is to reach genius rank, along the way I explain how I solve them. You do not need any programming background to get started, but you will learn a ton of new and interesting things as you go.

![programming challenge](https://dev-to-uploads.s3.amazonaws.com/i/mlse31jx58fgmbesx5g9.png)

This is a pretty interesting challenge. One thing we haven't covered until now are JavaScript objects. An object is a "thing" that can hold different variables internally. To illustrate this, say we have an object called "Animal", an animal can have a color, height and weight. In JavaScript code our Animal object would look like this:

```JS
animal = {
  color: 'black',
  height: 50,
  weight: 100
}
```

We can access and change an object's internal elements (= members) like this: `animal.height = 70`. We can also create and remove members from objects, let's add a `type` member to our animal like this: `animal['type'] = 'panther'`.


Now back to our challenge, we have to fix two bugs (💰 and 💧) in the code, such that `R` yields 3. You don't have to start executing the code to solve the challenge, just a little bit of insight is enough here.

One of the buggy lines is: `if (💧 in mp == false)`, basically it checks whether the identifier 💧 (which is most likely a variable) is not inside our object `mp`. In other words, it checks if `mp` is missing the member represented by 💧. Right now we can't say for certain what 💧 should be, until we investigate the next line.

The next buggy line is `💰[s] = 0;`, which sets the `s` index in 💰 to zero. If you have a little bit of programming experience, you should realize that these two lines are very related. The identifier 💰 should be `mp`, while 💧 should be `s`.

![programming challenge answer](https://dev-to-uploads.s3.amazonaws.com/i/jd43j28ygocr2h6jie66.png)

You may ask, but why? The answer requires you to fully understand the code. We use the object `mp` to keep track of occurrences of characters in the string `S`, which in this case is `010101`. All that the code does is iterate over each character in this string, and count how many times each character occurs.  After running this code, the object will look like this:
```JS
mp = {
   '0': 3, 
   '1': 3,
}
```
Each of the characters occurs 3 times in the string `S`. That's why `R == mp[0] == 3`.

---

If you feel inspired and motivated to upgrade your coding + debugging skills, join me on the Road to Genius at https://nevolin.be/codr/
Basics of the Unix Philosophy for life and that
Tags: unix
Published: 2020-06-09 21:56:10

I rediscovered the eternal "Basics of the Unix Philosophy", buried in my files today. I immediately thought how good it would be to adapt a version for use as a political/social model or a way of being, and thought (as it often the case) "I'll make a repo for that" (done, but not yet public)…

It's something I'd forgotten, but absorbed so internally I try to follow it in actual life, without even realising what I'm doing.

So from Ken Thompson and Dennis Ritchie in 1973 (photo from Wikipedia) to the first few from [Eric Raymond's version](http://www.catb.org/~esr/writings/taoup/html/))…

### Modularity: Write simple parts connected by simple language

> The only way to tackle complex issues that won't fall apart is to hold global complexity down — to foster simple parts connected by well-defined communication channels and understandable language, so most problems are local to a specific part and there's some hope of updating one without breaking the whole.

### Clarity: Clarity is better than cleverness

> Write policies as if the most important communication they have is not to the system but to the people who will implement, live them out and maintain them in future (including yourself). Making the key points graceful and clear... means they're less likely to be interpreted wrongly.

### Composition: Create systems to be connected to other programs

> To make systems composable, decouple them. A system at one end of a process should know only what is necessary about the processes of the system at the other end—it should not depend on it. It should be easy to replace one end with a newer, updated or different system without disturbing the other.

### Separation: Separate policy from implementation; separate idealism from action

> Policy and implementation tend to mutate at different timescales, with policy changing much faster than the ability to implement it. Political and social trends may come and go, but basic human needs, methods of implementation and psychology change very little.

etc. Well, it's a start!
Por qué descubrí "tarde" la programación?
Tags: career
Published: 2020-06-09 21:38:49

Éste año hubo un cambio muy grande en mi vida y quisiera compartirlo con ustedes. Y no, no estoy hablando de la pandemia y el Coronavirus. Éste año finalmente descubrí un mundo nuevo y fascinante, descubrí la respuesta a las eternas preguntas que los adultos nos hacían cuándo éramos niñas y niños del estilo: "Qué queres ser de grande?".
Que difícil es para un niña o un niño llegará una única respuesta!
Ellos que recién están descubriendo el mundo y cómo funciona, experimentando con todo lo que conocen y no conocen, y esa curiosidad infinita que nunca se acaba y que nos hace querer ser niños de nuevo. 
"Yo quiero ser veterinaria para curar a los animales", decía. Al tiempo cambiaba, "Mejor quiero ser astronauta así voy a la luna" y así rotaba cada cierto tiempo de profesión en profesión, sin tener una respuesta única nunca y definitiva.
Hasta que la adultez llega y te vez obligado a tomar una decisión. Y tenés que pensarlo mucho porque eso que elijas vas a hacer toda tu vida. Además, tenés que estudiarlo en la universidad (como corresponde), recibirte antes de los 25(después ya es tarde) y una vez que hagas todo esto, vas a sentirte plena y feliz. Vas a sentirte realizada.

O eso es lo que nos hacen creer.

La realidad es que la vida es compleja, difícil por momentos, las circunstancias de vida no son las mismas para todos, no todos tenemos acceso a las mismas oportunidades, sea por la razón que fuese, y todo esto nos lleva por caminos que no son los que queremos, esperamos o planeamos. De repente nos vemos pasando los 25 años sin título universitario como se supone "debemos tener", forzandonos a estudiar algo que no disfrutamos porque "se nos acaba el tiempo", porque "ya estamos grandes", porque "nadie nos va a dar trabajo". Las expectativas son tan altas y por momentos, irreales, que no nos detenemos a pensar en qué nos gusta, realmente, qué nos gusta? Qué disfrutamos hacer? No nos interesa descubrir eso que nos llama la atención, saber más sobre eso que nos da curiosidad aunque no entendamos qué es. Es un camino muy largo, pensamos. En cambio, vamos por el camino fácil y rápido, porque de eso se trata, hacer todo en tiempo récord y poder mostrarlo en redes sociales para ganar likes y aprobación social. Elegimos el camino de nuestras madres y padres, elegimos lo conocido, elegimos lo cómodo. Elegimos esto por sobre nuestro verdadero ser, nuestra verdadera escencia, lo que nos hace nosotros.
Que difícil e incierto es encontrarse en ésta situación pero que hermoso es, al fin, encontrarse a uno mismo, encontrar lo que somos y no lo que otros quieren que seamos. 
Éste año me encuentro en éste nuevo camino en el que conocí a muchas personas increíbles, que me inspiran a crecer y ser mejor.
Éste año yo misma creé mis oportunidades (como dice un gran profesional del área de la programación al cuál admiro mucho), descubrí lo que realmente me gusta y me llena, y no, no lo descubrí tarde, lo descubrí justo a tiempo.
Apesar del contexto, de las expectativas sociales, de todo.
A pesar de todo eso, mi historia recién empieza.
Day 150 : All Day
Tags: hiphop, code, coding, lifelongdev
Published: 2020-06-09 21:24:07

_liner notes_:
- Professional : Pretty much spent all day working on my workshop later this week. Trying to make this as thorough as possible. I've got slides, code snippets, stripped the application to the bare bones and have comments, live coding, everything! haha I'm pre-recording the videos so I even wrote out a script! haha. Almost done, just have to record the videos. I've got everything split up into sections, so I don't have to record everything in one shot.

- Personal : Didn't really do much last night. Went to bed early so I could get up and start working on my workshop.

![A large mountain and a smaller one covered in greenery sticking out of the water in Kelingking Beach, Indonesia](https://dev-to-uploads.s3.amazonaws.com/i/cmtiltyhmlyl98nmojoy.png)

Going to eat dinner, then I'm going back to record these videos for my workshop. Want to get it turned in tonight so that my team has a chance to check them out.

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube FRBEvkSPXxk %}
Week 8: Working with APIs
Tags: javascript, webdev, codenewbie, beginners
Published: 2020-06-09 21:12:58

---
title: Week 8: Working with APIs 
published: true
description: 
tags: javascript, webdev, codenewbie, beginners
cover_image: https://www.linuxfoundation.org/wp-content/uploads/2017/10/REST-APIs.png
---


####This week was Working with API’s from Colt Steele The Web Developer Bootcamp.
     -Intro to API’s 
     -JSON and XML 
     -Making API Request with Node
     -JSON Placeholder API Example 


###Intro to API’s 
API is known as Application Programming Interface.  
API’s are used to get preexisting data to use within multiple projects. API's are just basic interfaces for code/computers to talk to one another. 
In web development, web API’s work by communicating with the HTTP protocol.  

###JSON and XML 
API’s don’t send information back as HTML, because HTML contains information about the structure of a page. API’s only send pure data back as a response, it does not send the structure of that data therefore, data formats are used to make the data easier to read. Data formats are used to make HTML data easier to read. There are two types of formats that are used which are known as JSON (JavaScript Object Notation) and XML (Extensible Markup Language). 

XML is syntactically similar to HTML, but it does not describe presentation like HTML does. All it does is provide key-value pairs 
```XML
<person> 
<age>21</age>
<name>Travis</name>
<city>Los Angeles</city> 
</person> 
```
JSON is JavaScript Object Notation it is a cleaner more organized way to format HMTL data than XML. JSON also utilizes key-value pairs. 

```JSON 
{
“person”: {
“age”: “21”, 
“name”: “travis”, 
“city”: “Los Angeles”
}
}
```
JSON is more common than XML because it can be utilized in normal JavaScript programming. 


###Making API Request with Node

Utilizing a Request HTTP client 
It is possible to make a API request from a JavaScript file. 
First, a request must be made to the URL of that API. 
During the time that this course was created, a now deprecated code base was used. 

{% github request/request %}

```javascript 
var request = require(‘request’); 
request(‘URL Here’, function (error, response, body) {  
if (!error && response.statusCode == 200) {
console.log(body)
}
})

```
Although this course may be a slightly outdated, I believe that the concepts remain relevant. 




###JSON Placeholder API Example 
JSON Placeholder is dummy data that is made up to use in any application. 
Free JSON data to use in any projects. 
https://jsonplaceholder.typicode.com/



####Overall, I have learned how valuable API's are to web development. It is important to consider preexisting data to work with that way a solid foundation can be built upon with whatever the current project is at the moment. So much data is widely available and made easy to use with a simple API.
Python Face_recognition
Published: 2020-06-09 21:03:50

---
title: Python Face_recognition
published: true
description: Error on conversion
tags: 
//cover_image: https://npctech.net.br
---
Hello, excellent post.
I have an application for face recognition. It turns out that when I put "import face_recognition" or "from imutils import seed" or "from random import randint" the program gives a "fatal error detected", "failed to execute script ..." if I remove these imports the program runs normally .
Can you help me ?
#40daysofHybridCloud (Day-6)
Tags: aws, cloud, amazon, cloudfront
Published: 2020-06-09 20:35:55

##*#Day6*

Last time we get into details of how Cloudfront is useful , today we will discuss more about it and few more amazing concepts.

As we all know that CloudFront is a CDNaaS for AWS which help the clients to get the data at high speed beacuse it is stored at Edge location which is near to the requested client area , the data is present in cache format therefore have less latency rate.

Cloudfront comes with it's own limitation like what if the data which is present in form of cache get updated then it have to go back and update the cache every time which is not an efficient way.

>The solution to this is one method , which cleans the cache 
present at the Edge Location called <b>*Invalidation*</b>.

Remember that cloudfront only store the data which is static in nature like Images , Videos and pdf but what about the data like code file etc therefore it does not support the dynamic files like LIVE Streaming which require RMTP .

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

Here comes the Solution to the problem called <b><i>"Global Accelerator"</i></b>

>A service that uses a AWS Global Network to improve the availability and performance of your Application to your Local and Global users.

Global Accelerator is also used as Load Balancer when large amount of traffic comes to the site.
It continuously monitor health of our Applications endpoints and if some how one endpoints is down then it redirect the traffic to other endpoint where the App health is good.
GA also generate a common/global URL of App for all users , therefore no need to give the origin URL to clients .

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

##<b>AMI</b> 
Amazon Machine Images are copy of the instances which can be used further according to the requirement.

>*AMI* types are categorized according to region, operating system, system architecture (32- or 64-bit), launch permissions and whether they are backed by Amazon EBS or backed by the instance store. 
  
Users can select an AMI provided by AWS, the user community, or through the AWS Marketplace. Users can also create their own AMIs and share them.

They are more protected then regular instances as no user and password is required therefore can not be penetrated by Crackers. 
   
Thanks,
*Happy Learning :)*
Business Continuity
Tags: businesscontinuity, itbusinesscontinuity, businessrecovery
Published: 2020-06-09 10:17:51

Regardless of the nature, scale or complexity of your operations, a <a href="https://www.stayinbusiness.com" title="Business Continuity Plan"><strong>business continuity plan</strong></a> is imperative to stay in business during crisis situations that could lead to staffing shortages and damage to physical assets. The probability of such disasters occurring might be low. But organizations still take all the preventive measures as their impact on revenue and company reputation could be devastating and oftentimes irreparable.
 
<a href="https://www.stayinbusiness.com/resource/business-continuity/" title="Business Continuity Planning"><strong>Business continuity planning</strong></a> entails the collection, collation and processing of large volumes of data as well as providing training modules to bridge any gaps in skills, in order to make the solution relevant.

<strong>Business Continuity Planning – Essential Elements</strong>

<ul>
<li>Intelligence gathered from business impact analysis and risk assessment</li>
<li>RTO and RPO timeframes that are compatible with business goals and targets</li>
<li>Contact information of internal and external teams such as business continuity teams, providers, vendors, interest groups and so on. </li>
<li>Detailed procedures on how to restore mission critical activities. </li>
<li>Testing mechanisms to evaluate the plan's effectiveness in simulated environments </li>
<li>Maintenance systems to review and update the plan over a period of time</li>
</ul>
I'm starting a YouTube channel to journal my side projects
Tags: showdev, webdev, watercooler, javascript
Published: 2020-06-09 20:13:26

Hi 👋,

So... I've been writing blog posts for a few years. First on Medium, then at www.mikenikles.com and in about two weeks, I will release Cloud Native Web Development (https://gum.co/cloud-native-web-development).

With the current work-from-home environment, I save a good amount of time commuting every day. Initially, I invested that time into writing the above-mentioned book. This is now in final review and I am looking at my next project.

## Current website architecture

My personal website at www.mikenikles.com is based on a proof of concept architecture. It uses Ghost.org deployed in a serverless environment called [Cloud Run](https://cloud.run). The actual website is a static Sapper / Svelte application. Check out [my blog post](https://www.mikenikles.com/blog/migrating-from-medium-to-my-own-blog) with more details.

The current architecture looks like this:

![Website architecture v1.0](https://dev-to-uploads.s3.amazonaws.com/i/lt98cmfojp6grwh64dk2.png)

It's time to rebuild it. It's time to prepare for the next chapter of how I spend my free time.

## Rebuilding my personal website from scratch

I am tracking the progress on GitHub at https://github.com/mikenikles/www-mikenikles-com/projects/1.

> More importantly, I am going to live-stream the entire process on my new YouTube channel called **The Software Architect** at https://www.youtube.com/channel/UCgEvLz_YbByFqn8f32wh9lA/

The plan is to pick an issue on GitHub, work on it and record what I do. If you catch me live, great! Otherwise, all videos will stay on the channel to view later.

I focus on four goals initially:
* **Ownership** - Content & assets hosted on GitHub, anyone can contribute with a PR. No dependency on 3rd parties (e.g. CMS).
* **Best practices** - Performance, SEO, a11y, works without JavaScript, Lighthouse score of 99+, Core Web Vitals.
* **Automation** - GitHub Actions takes care of the entire CI / CD pipeline.
* **Operating costs** - As close to $0 as possible. No database.

## Why should you watch?

As I develop the new website, I will experiment with new technologies, I will share my thoughts on best practices, I will teach, I will make mistakes and fail to achieve certain tasks in a way I had imagined. You can learn from that and avoid these mistakes in your projects.

In the end though, this is also a personal challenge! I've given many public talks, organized large meetups and led multi-day workshops with 20+ participants. Sitting at home talking to a camera is very different and I want to challenge myself.

## What's next?

Subscribe to [my channel](https://www.youtube.com/channel/UCgEvLz_YbByFqn8f32wh9lA/) if the above sounds fun. There are four videos I recorded to get started.
Follow me on Twitter [@mikenikles](https://twitter.com/mikenikles) for updates and a heads up when I will be live.

See you!