teleren/devto huggingface dataset:
Introduction to python for data engineering
Published: 2022-04-24 14:22:10


Do you want to build a website? an application? a video game
name it or manipulate data, python got you covered. Python is a multi-purpose high level programming language that can help you develop or do almost anything.
It is easily available for free and open source , it has gained popularity and it is being used by big organizations like Google, Disney and even NASA.
Python has evolved and now we have python 3 which is the latest version. Python is famous among data handlers that is data engineers, data scientists and data analysts, this because it has a wide variety of libraries and modules like Pandas, numpy, scikit-learn,seaborn, matplotlib etc that make data preparation,data processing and data analysis efficient. data engineers use python to create data pipelines and to write script to automate data cleaning amongst other processes
lets try it!
lets try writing our 1st python program and see how simple it is

```
print(`hello world!`)
output: hello world!
```
The print statement will be followed by a parentheses that enclose what we want displayed as our output
**python syntax** 
_whitespaces and indentation_
Python uses whitespace and indentation to construct the code structure unlike other programming languages that use semicolons to separate statements.
_comments_
Comments help us document our code for future reference 
we have several ways of writing comments in python 

1. using #

```
`#this is a comment`
```
it is mostly used for single line comments
2. using ***

```
`*** this is a multiline comment***`
```
_identifiers_
Identifiers are used to identify variables, functions  and other objects in python.
The name of an identifier should begin with a letter or an _
python is case sensitive and therefore care should be taken when naming them.
it is important to note that python key words should not be used as identifiers
_keywords_
Some keywords in python are listed below
False 
class      
None       
True    
while
raise
this are words which have a special meaning in python
you can use the code below to list all the keywords

```
import keyword 
print(keyword.kwlist) 
```

**Data types** 
strings 
integers
floats
**control flow **
_Boolean and comparisons_
Booleans have two values that is true and false 
_if statements_
with if statements the condition check and if its true the statement is executed otherwise they are not.

```
x=45
if x>5:
    print ("x is greater than 5")
```
_else statements_
The else statement can be used to execute statements if the if statements is false.
Same as if statements the code inside the statement needs to be indented.

```
x=4
if x==5:
 print("yes")
else:
 print("no")

```
_while loops_
we use while loops to repeat a block of code several times

```

i=1
while i<=5:
 print(i)
 i=i+1
print("finished!")

```
_break _
This is used to break a while loop if the conditions we want are matched 

```
`i=0
while true:
 print(i)
 i=i+1
if i>=5:
 print("breaking")
break`
```
Dilemma
Tags: javascript, codenewbie, webdev, beginners
Published: 2022-04-24 14:21:46

I feel overwhelmed during my time as web developer. Many times I thought to resign from this job when I stuck in writing code, but I always feel enjoy when I resolve an error or my code running well as I hope. 

I am a slow-learner person, especially for new things. Being a react developer is a new thing in my life because my educational background was not IT. I am having trouble for understanding about the logic, the algorithm, main and basic concepts of javascript, and state management such as redux. 

Especially logic. Logic kills my brain slowly (haha) yet at the same time improve my critical thinking and problem solving skills. But I really need more more and more time to learn it. While, in my current job, I have to coding fast. There is a bunch of logic I should learn in short time until to the point that I sacrifice my health (recently I sleep at 4.00 am and have to wake up at 8.00 am), my productivity (I have nothing to do except coding), my family (I spent more time lonely inside my bedroom), and my mental health (feel overwhelmed, stress, overthinking, emotional, etc).

I wanna resign, but I really want to explore more in this field.

For those who read this post, I wanna ask you:
When should I am stop being a developer? When should I am thinking like "Enough for me. This is not my place to growth. I had push my limit." When should I have to switch my career?

So that I know when to stop or continue..

Thank you !
Differences between Blockchain and Cryptocurrency
Tags: blockchain, architecture, security, discuss
Published: 2022-04-24 12:14:01

People aways misunderstand blockchain with cryptocurrency.
It is because the first cryptocurrcency Bitcoin uses the blockchain technology.
But the blockchain technology is one of the technologies used in the first cryptocurrency - bitcoin, it is only a storage technology that keeps data checked. With the bitcoin p2p network and the hashrate contest which can almost keep it unable to be changed by any attack.
So the blockchain technology itself is a very simple technology.
The unchangablity of the cryptocurrency data is assured by the consensus algorithm not blockchain.
With consensus, we can hold data from being changed without blockchain technology.
I don't think we should misconcept everything into blockchain, such as consensus, p2p network, persistent data, wallet.
These concepts should be part of the cryptocurrency technology.

As far as we can see, these technologies are currently included in the crytpocurrency technology:
1. Persistence: Blockchain / dag
2. P2P networking
3. Consensus
4. Money System: Mining/Wallet/Transaction
5. Extension: Contracts

As cryptocurrency technology still on its early stage, we should be clear that the cryptocurrey technology can be very importance to the future of the world.
The new decentralized world may be build upon it.
Control SWAY WM over SSH
Published: 2022-04-24 14:13:57

Salut tout le monde,

Manager Sway à travers une connection SSH peut être très utile,surtout si vous n'avez pas accès au clavier sur votre server.Surtout que les raccourcits claviers ne marcherons que la machine ou SWAY est installé.

Dans un premier temps, on va récuperer le socket grâce à la commande suivante:

`export SWAYSOCK=${XDG_RUNTIME_DIR}/sway-ipc.1001.1678.sock`

Le fichier aura un nom différent puisque la commande est définie comme ci-dessous.

`sway-ipc.group-id.process-id.sock`

Voilà, il nous reste plus qu'à utiliser les commandes suivantes pour gérer SWAY:

**Lancer une application:**
    `swaymsg exec foot `

Pour lancer un terminal avec une commande
`swaymsg foot 'man libinput' `

**Changer le focus(Selectionner la fenêtre adjacente).**
`swaymsg focus left/right/up/down`

**Passer la fenêtre en plein écran**
`swaymsg fullscreen`

**Fermer la fenêtre**
`swaymsg kill`

**Déplacer la fenêtre sur l'espace de travail**
`swaymsg move to workspace 2`

**Aller sur l'espace de travail suivant/précèdent**
`swaymsg workspace next/prev`

**Création d'un nouveau espace de travail**
`swaymsg workspace 2/3/4...`
4 Dank Front-end tools
Tags: webdev, design, productivity, tooling
Published: 2022-04-24 13:58:46

Hello guys today i am going to show you 4 dank front-end tools which you can use to create overall beautiful designs for your websites
Thes 4 tools helps you to create unique box-shadow , border-radius , gradient-colors and glassmorphism effects.

Lets get started....

# 1. Box-shadow - 
This website helps you to create box shadow by manipulating number of shadow layers, transparency , horizontal and vertical distance of shadows , blur strength and spread distance of the shadow.

Link - https://shadows.brumm.af/


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z98br4deak37dtaqgjdo.png)

# 2. Border-radius - 
This website helps you to create unique borders for your cards or any other elements with the help of box-radius property of css.

Link - https://9elements.github.io/fancy-border-radius/


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ozis53zztmxqnkgduhl7.png)

# 3. Glassmorphism Effect -
This website helps you to create glassmorphism effect which is very beautiful design if used with a good background.It has 2 values to manipulate blue and transparency and also you can set the background colors

Link - https://hype4.academy/tools/glassmorphism-generator


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rdy14nu1s43ity5c413s.png)

# 4. Gradients - 
This website helps you to create beautiful gradients with multiple colors to manipulate.
Link - https://www.csshero.org/mesher/

(It's alternative is uiGradients - https://uigradients.com/#Dracula)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0rcfgrvlxw06r1l9md1i.png)

Thats it for this post.
THANK YOU FOR READING THIS POST AND IF YOU FIND ANY MISTAKE OR WANTS TO GIVE ANY SUGGESTION , PLEASE MENTION IT IN THE COMMENT SECTION.
^^You can help me by some donation at the link below Thank you👇👇 ^^
☕ --> https://www.buymeacoffee.com/waaduheck <--

Also check these posts as well
https://dev.to/shubhamtiwari909/higher-order-function-in-javascript-1i5h

https://dev.to/shubhamtiwari909/styled-componenets-react-js-15kk

https://dev.to/shubhamtiwari909/introduction-to-tailwind-best-css-framework-1gdj
Next.js + Splitbee
Tags: nextjs, react, javascript, webdev
Published: 2022-04-24 13:32:11

This guide is an extension and update of the [Splitbee Next.js Proxy Documentation](https://splitbee.io/docs/nextjs-proxy). I have added the [Next.js Script Component](https://nextjs.org/docs/basic-features/script) to the guide, along with a few more quality-of-life improvements.

## Table of Contents

- Next.js Config Setup
- Creating the Analytics Component
- Using the Analytics Component

## Next.js Config Setup

First, we need to make use of [Next.js Rewrites](https://nextjs.org/docs/api-reference/next.config.js/rewrites) to point the local payload url to the Splitbee server.

```js
// next.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
  async rewrites() {
    return [
      {
        source: '/bee.js',
        destination: 'https://cdn.splitbee.io/sb.js',
      },
      {
        source: '/_hive/:slug',
        destination: 'https://hive.splitbee.io/:slug',
      },
    ]
  },
}

module.exports = nextConfig
```

## Creating the Analytics Component

Next, we add a script tag that imports the Splitbee code. As per the [original documentation](https://splitbee.io/docs/nextjs-proxy#2-adapt-the-splitbee-script-tag):

> `data-api` sets the endpoint for all tracking calls. We are using `/_hive` in this example.
>
> `src` needs to point to the Splitbee JS file that is proxied through your servers. We are using `/bee.js` in this example. Feel free to adapt those paths & filenames.

We can abstract the logic into an Analytics component.

```tsx
// components/Analytics.tsx
import Script from 'next/script'

export const Analytics: React.VFC = () =>
  typeof window != 'undefined' &&
  window.location.href.includes('[site_url]') ? (
    <Script src="/bee.js" data-api="/_hive" strategy="afterInteractive" />
  ) : null
```

Replace `[site_url]` in `window.location.href.includes('[site_url]')` with the name of your production deployment domain. This will prevent errors from popping up in the console during development.

You can also adjust the strategy attribute according to your needs (view the [documentation](https://nextjs.org/docs/api-reference/next/script#strategy) for the available options). However, in most cases, you should stick to `"afterInteractive"`.

## Using the Analytics Component

Now all that remains is to import the Analytics component into the application – ideally in `_app.tsx` to avoid duplication.

```tsx
// pages/_app.tsx
import { Analytics } from 'components/Analytics'

import type { AppProps } from 'next/app'

const App: React.VFC<AppProps> = ({ Component, pageProps }) => (
  <>
    <Analytics />
    <Component {...pageProps} />
  </>
)

export default App
```
What are your favorite course platforms for furthering your learning?
Tags: discuss, programming, webdev
Published: 2022-04-24 13:50:21

---
title: What are your favorite course platforms for furthering your learning?
published: true
description: 
tags: discuss, programming, webdev
//cover_image: https://direct_url_to_image.jpg
---

I've seen a few platforms that people have recommended to me but I've had varying success with them and have heard positives/negatives about each. I was wondering what everyone else hits up!

I personally prefer courses by individuals as they seem to be higher quality (eg. Epic React). I do have an [egghead](https://egghead.io) subscription but I basically never use it anymore. 

How about you all?
O que é o “Hoisting”?
Published: 2022-04-24 12:31:56

Continuando os escritos pontuais da linguagem JavaScript, hoje vou escrever sobre o “*Hoisting*”. 


Antes de continuar é importante avisar da necessidade de conhecer o conceito de escopos global e local. 

Na literatura é comum dizer que o *Hositing* é um processo no qual as declarações das variáveis e das funções são movidas para o topo do código durante o processo de compilação/interpretação. A imagem a seguir tentar mostrar como seria sob essa visão:


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hnxwfhgmy58i876etf0p.png)

Na verdade, não é bem assim que ocorre, trata-se apenas de uma maneira didática de compreender o processo. 

De acordo com o MDN, “*as declarações de variável e função são colocadas na memória durante a fase de compilação, mas permanecem exatamente onde você as digitou no seu código.*”.

Ou seja, todas as variáveis e funções com escopo global são alocadas na memória, sem que sejam retiradas das suas posições no código. 

É como se o compilador/interpretador mapeasse todas as declarações das funções e variáveis.

O levantamento como dizemos acima não ocorre, como disse, é uma maneira didática de compreender o processo. 

Impera salientar que ocorre apenas com as funções e variáveis com escopo global. Declarações com escopo local não sofrem o “*Hoisting*”. 

Vamos para um exemplo de código para ver suas implicações práticas:

```jsx
console.log(a) // undefined

var a = 1;

console.log(a) // 1
```

Veja que, apesar que a variável ‘a’ tenha sido declarada após o primeiro ‘console.log()’, o resultado na tela foi ‘*undefined*’, ou seja, para ela apenas não foi definido um valor. 

Outro exemplo com ‘*let*’:

```jsx
console.log(a) // ReferenceError: a is not defined

let a = 1;

console.log(a)
```

Agora quando declaramos a variável por meio do ‘*let*’ é retornado um erro de referência. É acusado que a variável não foi definida. 

Isso acontece em razão do escopo local de ‘*let*’, assim, não sofre o *Hoisting*.

Essa é a diferença, por meio do processo de *Hoisting*, mesmo que a declaração seja posterior, o  compilador/interpretador já a conhece, e apenas devolve que não foi inicializado nenhum valor para ela. 

Por outro lado, quando a declaração tem natureza de escopo local. A sua chamada antes da declaração devolve um erro de referência: acusa-se que a variável ou função não foi declarada.
Fixing Android Studio Blank/Grey screen in Linux + Picom
Published: 2022-04-24 12:19:03

If you use Linux with Picom and transparency enabled, android studio is not going to work.

Initially when I installed it I got this
![Blank screen of Android Studio](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iia7eadphckv4zhyncti.png)
 
After struggling for few minutes I said lets check the compositor, and I reloaded it and for a second I saw the android studio... then it hit me it seems that Android Studio doesn't support rounded-corners and doesn't have a way to work around it and so I went in `picom.conf` and excluded
`jetbrains-studio` under the `rounded-corners-exclude` and also under transparency and opacity

```
rounded-corners-exclude = [
  "window_type = 'dock'",
  "window_type = 'desktop'",
  "window_type = 'tooltip'",
  "window_type = 'popup_menu'",
  "class_g = 'firefox'",
  "class_g = 'Brave-browser'",
  "class_g = 'LibreWolf'",
  "class_g = 'jetbrains-studio'"
];
```
![Android Studio](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fqqr0jdzi41szd0n6ueh.png)
Frameworks and Reinventing the Wheel
Tags: programming, webdev, productivity, javascript
Published: 2022-04-24 12:10:20

"Don't reinvent the wheel, just use framework X" is a popular phrase today in many software development circles.

As the test of time showed us, the wheel is as close as possible to the perfect invention, perfect concept.

How close are modern frameworks to this perfect invention? How many of them could actually stand the test of time? How about 20 years? 10 years?

Ok, how about the concepts they are built upon - OOP towers of abstraction, ActiveRecord (anti)pattern and Rails clones, or more recently, various SPA architectures?

## Long term implications

Although they are usually started with good intentions, frameworks very often end up being pools of bad practices. There are many trade-offs they have to do to be as generic as possible and easy to grasp for less experienced developers.

What's really important to understand is that your whole codebase is chained to their often-very-flawed implementation of the often-very-flawed concepts. 

What happens when the features or implementations you depend upon are changed or removed? Or when you'll need more control over them? 

What happens when the whole framework (or its version) becomes obsolete or abandoned?

## What's the alternative?

Good custom architecture (specific to your application) will outlive any ready-made framework, you won't lose the ground beneath your feet and you'll have full control over things. But it requires much more experience and effort.

Although this obsession with frameworks has gone too far, this doesn't mean no one should ever use frameworks, far from that. It just means that you should make sure that you really understand the long-term trade-offs of the decision you're making.

Just keep in mind that these "wheels" are very fragile, and can't be easily replaced.

---
<small>Note: this is a snapshot of a (WIP) topic from the Understanding Simplicity wiki.<br>You can read the latest (better formatted) version here: [Frameworks and Reinventing the Wheel](https://devsimplicity.com/frameworks-and-reinventing-the-wheel)
<br>All suggestions (and reactions) are welcome.</small>
Automate working environment startup
Tags: tutorial, windows, efficiency, automation
Published: 2022-04-24 11:41:53

## Why?
It's 8 am and the working day has begun. You turn on your computer, open your mail program, open teams/skype, open your Notes, open your favorite IDE, open a text editor, and open terminals to different repos. You decide to grab a quick coffee, meanwhile, your colleague asks for help on a project, and you tell them you'll be right there as soon as your computer is ready. You open the browser and all the tabs that you need. The time registration software also needs to start. The boss asks about the progress on the crucial task he assigned you and you tell him that you'll get on it in a minute. You open up the company's issue tracker system and now you are finally ready to start working, and it's only 9 am! You go to help your colleague, but he says he is busy with meetings and that you can look at it together over lunch. Your boss asks why you are not at your desk and gives you are warning for slacking off at a crucial time for the company. You go back to your desk and can't wait to go home.

Exaggeration? Yes. But while we can't easily automate the morning coffee we can automate our working environment. 

## How?
Here's how to make your windows laptop automatically open Google Chrome, Outlook, Notepad++, a VS Code workspace, and a windows terminal with 2 tabs:

1. Press `Win + r` and type `shell:startup`. This opens up the `C:\Users\<user>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup`. Shortcuts and scripts in this folder will be executed at startup.
2. Copy shortcuts for Google Chrome, Outlook, and Notepad++ into the startup folder
3. Create a `Startup.bat` batch script that will open the terminal and VS Code Workspace and put it in the startup folder. Here's the code for this example:
```
start wt -d C:\temp\project1 ; new-tab -d C:\temp\project2
code C:\temp\test-workspace.code-workspace
exit
```
The Startup folder now looks like this:
![The Startup folder](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p6rq3l5rnxrayw42z38c.png)
 

On the next windows startup, all the files in the Startup folder will be executed automatically, making you ready to work immediately. By using batch files you can customize the startup process to fit your needs exactly:
![Windows Startup](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4c5j2fxnbnlvwlcjda0k.gif) 
 

### Note:
A lot of application comes prebuilt with a *Run on startup* feature that you should prefer instead of using the `Startup` folder. You can see a list of all the applications that come with this feature under `Settings -> Apps -> Startup`
TemplatesKart | New landing page built with ChakraUI
Tags: react, webdev, showdev, chakraui
Published: 2022-04-24 11:38:12

**TemplatesKart** provides an easy solution to getting the look you want for your website without having to mess around with too much code.

I launched this website a week ago. Now I updated the following pages UI for better user experience.

1. Landing Page Sections - https://templateskart.com
  * Hero Section
  * Key Features
  * Product Overview
2. Projects Page - https://templateskart.com/projects
3. Components Page - https://templateskart.com/components

## Some key features of TemplatesKart
* 50+ Components
* 6 Projects
* 100% Open Source
* Typescript Support
* Light and Dark Mode support for all components
* Fully Responsive components
 
**Github Repo**: [TemplatesKart Code](https://github.com/MA-Ahmad/templateskart)

## Screenshots

*Landing Page*

![landing page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9jqys2c94ewvqnq3atjr.png)

*Projects Page*

![projects page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6sfnxulgh5er628wemdz.png)

*Components Page*

![components page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f6g72jiidehhj53tk1kk.png)
fpdf2.5.2 : SVG support and comparison with borb
Tags: python, pdf, lib, release
Published: 2022-04-24 11:12:01

`fpdf2` is a simple & fast PDF creation library for Python that I have been maintaining since mid-2020.

<https://github.com/pyfpdf/fpdf2/> - Doc: <https://pyfpdf.github.io/fpdf2/> [![Pypi latest version](https://img.shields.io/pypi/v/fpdf2.svg)](https://pypi.python.org/pypi/fpdf2)

In this article, I'm going to present some of the new features that landed since [my last post on the subject](hacktoberfest-on-fpdf2.html), including **SVG support**.

![Ghostscript Tiger PDF preview](https://chezsoi.org/lucas/blog/images/2022/04/Ghostscript_Tiger.png)

I will also perform a quick comparison with the [borb](https://borbpdf.com/) library.

More after the jump: <https://chezsoi.org/lucas/blog/fpdf2-5-2-svg-support-and-borb.html>
JSON to Table Viewer/Converter
Tags: showdev, webdev, javascript, tool
Published: 2022-04-24 10:51:07

This **[JSON to Table converter](https://www.foxinfotech.in/2022/04/json-to-table.html) tool** allows you to display the JSON data in a table format. Where you can sort the data and search on every column. It also allows you to copy table data and export to CSV, XLSX, PDF and JSON format.

I developed this tool using [Tabulator JS API](http://tabulator.info/examples/5.2) and incorporated in my WordPress site.

Please [try this tool](https://www.foxinfotech.in/2022/04/json-to-table.html) and let me know your thoughts. Thank you.