teleren/devto huggingface dataset:
SQL meet Data Science (Pandas) cheat sheet
Tags: sql, python, datascience, datascientyst
Published: 2022-06-20 10:14:03

This is Pandas cheat sheet is intended for people who know SQL. The full version and high quality images are available here:

[Pandas vs SQL Cheat Sheet](https://datascientyst.com/pandas-vs-sql-cheat-sheet/)


The cheat sheet is divided into different sections and aims to help beginners in SQL and/or Pandas. It offers easy navigation, examples and beautiful visualizations.

![SQL meet Pandas](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lvoo6ttqfvlek2m44jqx.png)

It includes most common SQL operations like:
* Select
* Where
* Like, and, or
* Group by
* Join
* Union
* Limit
* Update
* Delete
* Insert

Plus extra materials like:
* Differences between SQL and Pandas
* Pandas to SQL
* Pandas from SQL
* Pandas and SQL with SQLAlchemy and PyMySQL
* Run SQL code in Pandas
* Generate SQL statements in Pandas

Enjoy :) 

This is the second part from a Pandas cheat sheet series.
Building a cocktail website using Vanilla JavaScript that consumes an API
Published: 2022-06-20 10:12:20


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


## **Introduction.**
I built a web application that would show pictures of cocktails recipes using HTML, CSS and JavaScript. I wanted to build my front-end skills using the HTML and CSS.

Upon completion I pushed to GitHub.

## **Core Features**
Web application built with HTML, CSS and JavaScript that consumes API.
Web application hosted on  GitHub.  

## **Tech Stack**
1. The project consumes API provided by CocktailDB.com to get the images of different non alcoholic cocktails.

2. I used HTML, CSS and Vanilla JavaScript to provide a working product.

3. Finally, the project on GitHub pages.

## **Projects Links.**
[GitHub](https://github.com/Laureen-Akinyi/Afric-Cocktails)
Building Clock Me In a sign in management system that consumes a GeoLocation API using Vanilla JavaScript
Published: 2022-06-20 10:03:03


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3jv6mkxicwukz5zuz5ek.PNG)

Hello there! Through this blog post I'm going to share with you how I managed to build a employee/student attendance management system that will be used to monitor the attendance of students and employees inside organizations.

**What does the project aim to overcome?**
The process of tracking working times has always been a complicated task. Over the years, several solutions have been developed to record the presence of employees. The most popular of these traditional manual attendance tracking systems are the time card, the perforation clock, and the time sheets.
The main disadvantages of such methods are :

- There is a risk in human error.

- Employees/students can commit time theft.

- Manual entry is very time consuming.

- Loss of private data such as mobile, Identification numbers and names.

**Tech stack**

1. The project firstly consumes an API provided by ipapi.io to get the current location of the users and cross-references it with the 
workstation IP address 

2. For this project I went with HTML, CSS & Vanilla JavaScript to provide a working product.

3. Lastly I decide to host the project on GitHub projects.

**Project Links**
[Link to project code](https://github.com/carlagesa/Clock-Me-In)
[Link to my GitHub profile](https://github.com/carlagesa/)
[Let us connect on Twitter](https://twitter.com/carlton_codes)
React App Generator - Soft UI Dashboard (free service)
Tags: webdev, react, opensource
Published: 2022-06-20 10:00:24

---
title: React App Generator - Soft UI Dashboard (free service)
published: true
description: This article explains how to use AppSeed and generate a full-stack React App powered by a simple NodeJS API Server - Sources are published automatically on Github (MIT license).
tags: webdev, react, opensource
canonical_url: https://appseed.us/generator/react/
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/39kcama492vz3k6ro68q.png
---
Hello! This article explains how to [generate a full-stack product](https://appseed.us/generator/)  that uses a modern **React UI** and a simple **Node JS API** for the backend logic. The source code is provided as a ZIP archive and is also saved on Github (MIT license) for later use. For newcomers, `AppSeed` is a platform that uses in-house developed automation tools to generate web apps in different patterns and programming languages. 

> `Thanks for reading!`

- 👉 [React Soft UI Generator](https://appseed.us/generator/react/soft-ui-dashboard/) - the tool used to generate the product
- 👉 [React Soft UI Dashboard](https://github.com/appseed-projects/0488994e-5b26-454c-b6dd-b9934e489c31) - the generated source code

The UI (template version) is crafted by `Creative-Tim` on top of the `M-UI Library` and released under the MIT license on Github. 

---

{% embed https://www.youtube.com/watch?v=JD7m1aAiEaE %}

---

## ✨ Video Transcript

The video starts with a short presentation of AppSeed and the APP Generator. Once the `Soft Ui Dashboard` design is selected, the product is generated using NodeJS as the backend technology:

- ✅ Access the React App Generator page
- ✅ Select the Soft UI Dashboard Design
- ✅ Select the API server from a short list
- ✅ Configure the DB Layer and Docker Support
- ✅ Generate and download the code
- ✅ Compile the product using VsCode Editor
- ✅ Register new users and authenticate.

---

## ✨ UI Presentation

Soft UI Dashboard React is built with over 70 frontend individual elements, like buttons, inputs, navbars, nav tabs, cards, or alerts, giving you the freedom of choosing and combining.

> [Soft UI Dashboard React](https://www.creative-tim.com/product/soft-ui-dashboard-react) - template version

This FREE MUI Dashboard comes with prebuilt design blocks, so the development process is seamless, and switching from our pages to the actual website is very easy.  

**Example Pages** - If you want to get inspiration or just show something directly to your clients, you can jump-start your development with our pre-built example pages. 

---

![Soft UI Dashboard React - Mobile View](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/10v0kg63viy1oc05k49a.png)

---

> `Thanks for reading!` For more resources and support, please access:

- ✨ More [Free Dashboards](https://appseed.us/admin-dashboards/open-source) crafted in Django, Flask, and [React](https://appseed.us/apps/react)
- ✨ More [Admin Dashboards](https://www.admin-dashboards.com/) - a huge index with products
Building TypeScript ORM
Tags: typescript, orm, opensource, sql
Published: 2022-06-20 09:59:47

We've spent last year writing the next big thing in the world of ORMs, specifically in the domain of TypeScript. I decided to share our initial 12 fundamental design decisions.

**1. Don't interfere:**
It is a library, not a framework. Be an opt in all the time. Provide features without any tradeoffs. Let developer opt out at any given time and place. Help, enrich, not interfere.

**2. Simple things stay simple:**
It is hard to do things simple. Avoid adding features if they break simplicity. Work them out until they can be integrated seamlessly. Remove or rework things that make library harder to deal with.

**3. SQL-like syntax, little to none learning curve:**
Learn SQL, not ORM libraries and frameworks.

**4. Predictability:**
Things should act the way you'd expect them. Everything should be explicit. Ask for permission if you need to act on behalf o a developer. APIs have to be explorable.

**5. Types:**
Types ground top. Developer should have no room to make a mistake. If something's wrong - it does not compile. Provide a way to write custom types. The only unsafe place is in raw SQL.

**6. Feature support:**
Spend 95% of the time on 95% of most used features.

**7. Joins:**
They have to be perfect. They have to be type safe, explicit and infinitely flexible.

**8. Migrations:**
That is easily the hardest one. Provide an opt in opinionated way to build semi-automatic, type-safe robust migrations. Provide an opt in opinionated way to run migrations.

**9. Stay slim:**
Little to none runtime overhead. Zero dependencies, stay serverless friendly. Embrace native database drivers, don't build our own. Transactions degrade performance and have to be opt it, not opt out.

**10. Production, Tests and Documentation**
Usage in real world projects. Extensive tests on multiple database versions. Extensive documentation.

**11. Communicate:**
Show your work, let people glimpse at what you're doing and how. Provide an easy to use communication and feedback channel

**12. Love:**
Share some love


Thanks for reading! Ping me out if you're interested in accessing a beta version of the ORM!
Arduino code for counting 1 to 15 in binary using LED light
Published: 2022-06-20 09:49:46

## Using Condition
```
int lights[] = {8, 9, 10, 11};
int maxNumber = 15;
int numOfLight = sizeof(lights)/sizeof(int);

void setup() {
  // put your setup code here, to run once:
  for (int i = 0; i < numOfLight ; i++) {
    pinMode(lights[i], OUTPUT);
  }
}

void loop() {
  // put your main code here, to run repeatedly:
  // represent 0 to 15 with light ->
  for (int i = 1; i <= maxNumber; i++) {
    // for all lights
    for (int j = 0; j < numOfLight ; j++) {
      digitalWrite(lights[j], LOW);

      if (i == 1) {
        digitalWrite(lights[0], HIGH);
      }
      if (i == 2) {
        digitalWrite(lights[1], HIGH);
      }
      if (i == 3) {
        digitalWrite(lights[0], HIGH);
        digitalWrite(lights[1], HIGH);
      }
      if (i == 4) {
        digitalWrite(lights[2], HIGH);
      }
      if (i == 5) {
        digitalWrite(lights[0], HIGH);
        digitalWrite(lights[2], HIGH);
      }
      if (i == 6) {
        digitalWrite(lights[1], HIGH);
        digitalWrite(lights[2], HIGH);
      }
      if (i == 7) {
        digitalWrite(lights[0], HIGH);
        digitalWrite(lights[1], HIGH);
        digitalWrite(lights[2], HIGH);
      }
      if (i == 8) {
        digitalWrite(lights[3], HIGH);

      }
      if (i == 9) {
        digitalWrite(lights[0], HIGH);
        digitalWrite(lights[3], HIGH);
      }
      if (i == 10) {
        digitalWrite(lights[1], HIGH);
        digitalWrite(lights[3], HIGH);
      }
      if (i == 11) {
        digitalWrite(lights[0], HIGH);
        digitalWrite(lights[1], HIGH);
        digitalWrite(lights[3], HIGH);
      }
      if (i == 12) {
        digitalWrite(lights[2], HIGH);
        digitalWrite(lights[3], HIGH);

      }
      if (i == 13) {
        digitalWrite(lights[0], HIGH);
        digitalWrite(lights[2], HIGH);
        digitalWrite(lights[3], HIGH);
      }
      if (i == 14) {
        digitalWrite(lights[1], HIGH);
        digitalWrite(lights[2], HIGH);
        digitalWrite(lights[3], HIGH);
      }
      if (i == 15) {
        digitalWrite(lights[j], HIGH);
      }

    }
    delay(1000);


  }
   
}
```
## Using Array of HIGH and LOW
```
int red = 8;
int blue = 10;
int green = 12;
int yellow = 13;
int lights[] = {red, blue, green, yellow};
int numOfLights = sizeof(lights)/sizeof(int);
int lightDelay = 500;



void setup() {
  // put your setup code here, to run once:
  for (int j = 0; j < numOfLights; j++) {
    pinMode(lights[j], OUTPUT);
  }


}

void loop() {

  //go from 1 to 15
  for (int x = 1; x <= 15; x++) {
    // array to store the HIGH and LOW values
    // 0 means low and 1 means high
    int a[] = {0, 0, 0, 0};
    int n = x;
    // get the array values [a,b,c,d]
    for (int i = 0; n > 0; i++) {
      a[i] = n % 2;
      n = n / 2;
    }
    // now we get high and low values, put them to the lights
    for (int j = 0; j < numOfLights; j++) {
      digitalWrite(lights[j], a[j]);
    }
    delay(500);
  }
  delay(500);

}
```
Puzzle-2
Tags: c, programming, beginners
Published: 2022-06-20 09:36:11

## Can you guess the output without the help of code editor ?

**If yes, then comment the output in the below comment section.**

```
#include <stdio.h>
#include <stdlib.h>
struct res
{
    char *name;
    int age;
}*ptr;

int main()
{
    char name[100] = "Dhanashree";
    ptr = (struct res *)malloc(sizeof(struct res));
    ptr->name = name;
    ptr->age = 28;
    printf("name = %s\n", ptr->name);
    printf("age = %d", ptr->age);
    return 0;
}
```
Thoughts on Digital Will & Digital Inheritance
Tags: blockchain, web3
Published: 2022-06-20 09:26:50

Hi guys,

Having long thoughts on implementing digital will and digital inheritance with smart contract.

In your opinion, if these can be someday legally bonded, what would be the best way to implement or even replace traditional will writing?

There are just too many digital assets that are deemed lost in limbo due to misplaced private keys or even during the owner's passing. Is there a more effective to be able to pass your hard-earned crypto assets even NFTs to your next of kin?

Is a smart contract able to verify and securely transfer crypto assets when we kick the bucket?
First program with GUI: Roll a dice
Tags: python, beginners, showdev, devjournal
Published: 2022-06-20 09:25:26

This times is to record a memorable day for me to create a program which look closer to what will be usable in real life.

## Code
This program is to act like a 6-face dice, when you press the button, a number will be randomly picked from 1 to 6 and display it

```python
import random
import tkinter as tk


def random_a_num():
    value = int(random.randrange(1, 7))
    lbl_value["text"] = f"{value}"


window = tk.Tk()

window.rowconfigure([0, 1], minsize=50, weight=1)
window.columnconfigure(0, minsize=50, weight=1)

btn_roll = tk.Button(master=window, text="Roll", command=random_a_num)
btn_roll.grid(row=0, column=0, sticky="nsew")

lbl_value = tk.Label(master=window, text="0")
lbl_value.grid(row=1, column=0, sticky="nsew")

window.mainloop()
```


![A program with one button and one label](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/80wwhevgyznv79fuw8oi.png)

## Reflection
I have learned a lot of useful basic syntax and concept in tkinter module. When the interface comes out and it works, I feel like my excitement on learning coding has increase a lot. More confidence to go on the learning path.
How to Scrape Data through a Data Scraping API?
Tags: webdev, javascript, programming, opensource
Published: 2022-06-20 09:23:19

In a world increasingly driven by data, the ability to scrape data is becoming more and more valuable. A data scraping API allows you to programmatically extract data from websites, making it easy to get the information you need from a large number of sources.Having a robust API can make all the difference. An API allows you to programmatically extract data from websites, making it a essential tool for developers who need to gather large amounts of data automatically.Data scraping APIs can be used to collect everything from contact information to product pricing and reviews.There are many different ways to scrape data, but using an API is often the most efficient and accurate method. If you're looking for a way to automate your data gathering process, a “[scraping API](www.zenscerpe.com)” is definitely worth considering. 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c89ye577glu0tp98mvuj.jpg)
docker-sync performance in Apple M1
Tags: m1, arm, docker
Published: 2022-06-20 09:16:30

Syncing by `docker-sync` is still faster than running by native (out of the box)

## Setup

### Hardware

- Apple M1 Pro
- 32GB
- Monterey
- "Enable VirtioFS accelerated directory sharing" experimental feature is checked

### Docker for Mac (only)

- Version: 4.9.1 (81317)
- Memory: 8GB
- CPUs: 5

## Results

### Native

```
docker run -it -v /tmp:/var/www alpine time dd if=/dev/zero of=/var/www/test.dat bs=1024 count=100000
100000+0 records in
100000+0 records out
real    0m 9.31s
user    0m 0.25s
sys     0m 3.91s
```

### Docker-sync - Strategy: native_osx

```
git clone https://github.com/EugenMayer/docker-sync-boilerplate
cd docker-sync-boilerplate/default
# Set a custom image in docker-sync.yml
#    appcode-native-osx-sync:
# +    native_osx_image: eugenmayer/unison:2.51.3-4.12.0-ARM64
docker-sync-stack start
```

```
docker exec -it default-app-native-osx-1 time dd if=/dev/zero of=/var/www/test.dat bs=1024 count=100000
100000+0 records in
100000+0 records out
real    0m 0.35s
user    0m 0.03s
sys     0m 0.31s
```

### Docker-Sync - Strategy: Unison

```
git clone https://github.com/EugenMayer/docker-sync-boilerplate
cd docker-sync-boilerplate/unison
# Set a custom image in docker-sync.yml
#    appcode-unison-sync: # tip: add -sync and you keep consistent names as a convention
#      src: './app'
#      sync_strategy: 'unison'
# +    unison_image: eugenmayer/unison:2.51.3-4.12.0-ARM64
docker-sync-stack start
```

```
docker exec -it unison-app-unison-1 time dd if=/dev/zero of=/var/www/test.dat bs=1024 count=100000
100000+0 records in
100000+0 records out
real    0m 0.31s
user    0m 0.03s
sys     0m 0.28s
```

## References
- [Performance — docker-sync 0.5.11 documentation](https://docker-sync.readthedocs.io/en/latest/miscellaneous/performance.html)
- [<sync_strategy>_image Configuration — docker-sync 0.5.11 documentation](https://docker-sync.readthedocs.io/en/latest/getting-started/configuration.html#sync-strategy-image)
#TestCulture 🦅 Episode 1 - The foundations of the Agile method
Tags: agile, testing, softwaretesting, devops
Published: 2022-06-20 08:58:25

In 1986, Ikujiro Nonaka & Hirotaka Takeuchi, two academics who observed companies such as Toyota, defined 3️⃣ categories of companies:
𝚃𝚢𝚙𝚎 𝙰 companies, such as NASA 🚀, which divide work into well-defined phases and do not move on to the next phase until the previous one has been completed.
𝚃𝚢𝚙𝚎 𝙱 companies, where the phases overlap slightly, based on the observation that it is conceivable, for example, to start the architecture when 80% of the specifications have been completed.
𝚃𝚢𝚙𝚎 𝙲 companies where everything is done at the same time, like in a rugby scrum.

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

The term 𝐚𝐠𝐢𝐥𝐞 appeared in the English-speaking business world in the early 1990s. In 1991, James Martin based his vision on the continuous evolution of computer techniques and proposed a 𝑚𝑒𝑡ℎ𝑜𝑑 for rapid application development. ✍

💡 If you don't know who is James Martin:
James Martin is an English consultant and author in information technology. He is known for his work on information technology engineering.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/igr4w68l7wjnoyy3mxsu.png)

Subsequently, in 2001, a manifesto for Agile Software Development was written in the United States by 1️⃣7️⃣ software development experts. 🔎 Each of these experts had already developed new methods that were lighter than traditional methods inspired by civil engineering. ⚙🛠

If agile methods did not appear thanks to this manifesto, it does however officially refer to these methods under the term 𝐚𝐠𝐢𝐥𝐞.🤓
The 4️⃣ values of the agile manifesto have been broken down into 1️⃣2️⃣ principles in order to provide operational support to teams wishing to follow them. 💪

The 4 values are:
👉 𝐈𝐭𝐞𝐫𝐚𝐭𝐢𝐯𝐞: Delivers a full system at the very beginning and then changes the functionality of each subsystem with each new release. 🔁
👉 𝐈𝐧𝐜𝐫𝐞𝐦𝐞𝐧𝐭𝐚𝐥: The system as specified in the requirements is partitioned into small subsystems by functionality. New functionality is added with each new release. 🔃
👉 𝐒𝐞𝐥𝐟-𝐨𝐫𝐠𝐚𝐧𝐢𝐳𝐢𝐧𝐠: The team has the autonomy to organize itself to best complete the work items. 📰
👉 𝐄𝐦𝐞𝐫𝐠𝐞𝐧𝐭: Technology and requirements are “allowed” to emerge through the product development cycle. 📈

Agile is currently an umbrella concept encompassing many methods. 📜 Agile methods will not out rule traditional methods because diverse processes for software engineering are still needed. ☝️

Learn more about the foundations of the #Agile method [on Agilitest' blog](https://www.agilitest.com/blog/foundations-agile-method). Thread [on Twitter.](https://twitter.com/agilitest/status/1501951028714897411?s=20&t=hFIoBX3b6NnmurXLMt0WDw)

----------
📚 𝕊𝕠𝕦𝕣𝕔𝕖𝕤:
🎴 https://agilitest.com/cards/do-everything-at-the-same-time
🌐https://en.wikipedia.org/wiki/Agile_software_development
📕 C. David, M. Lindvall, and P. Costa. "Agile software development." *DACS SOAR Report* 11. 2003.
📕 K. Beck,M. Beedle, and A. Van Bennekum *et al.* Manifesto for agile software development. 2001.
#3.Basic algorithms problems for frontend developers.
Tags: javascript, react, frontend, algorithms
Published: 2022-06-20 08:27:28

Check if a string is the anagram of another string.

Easy example:abba is the anagram of baab because it has the same number of characters and the same letters.
```
const anagrams = (string1, string2) => {
  /* call a cleanString function to clean up both 
  string of white spaces or other characaters such as ! or ? */
  const str1 = cleanString(string1);
  const str2 = cleanString(string2);

  /* if the length of string one is diffrent 
  than the length of string 2, we don't have an anagram */
  if (str1.length !== str2.length) {
    return false;
  }

  /* make both string an array, 
  sort it then join it again in a string. 
  If both string are the same we have an anagram */
  return str2.split('').sort().join('') === str1.split('').sort().join('');
};

/* helper function to clean a string 
of empty spaces or special characters */
const cleanString = str => {
  return str.replace(/[^\w]/g, '').toLowerCase();
};

console.log(anagrams('adrian ?', 'nairda !!'));
```
Google Chrome Extensions Can be Used to Track You Online
Tags: chrome, extension, track, webdev
Published: 2022-06-20 08:23:26

Hello guys, namaste ! Good morning !
I am Vipin Bansal and welcome to the caffeine code. 

whenever you install a browser extension on google chrome.it can be used to construct fingerprints. these fingerprints stores information of your device. which is called tracking hashes.
these hashes are used to track user's web activity.
to proof that concept a web developer compay Z0CCC develops a website, where you can see all installed extensions in your device.

this is link of that website.
https://z0ccc.github.io/extension-fingerprints/

{% embed https://www.youtube.com/embed/6ucd4LnWcXE %}
A Nice Developer Joke For Today
Tags: jokes, dailydeveloperjokes
Published: 2022-06-20 08:00:17

---
title: "A Nice Developer Joke For Today"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
published: true
tags: #jokes, #dailydeveloperjokes
---

Hi there! Here's today's Daily Developer Joke. We hope you enjoy it; it's a good one.

![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e125997196ca.png)

---

For more jokes, and to submit your own joke to get featured, check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/). We're also open sourced, so feel free to view [our GitHub Profile](https://github.com/dailydeveloperjokes).

### Leave this post a ❤️ if you liked today's joke, and stay tuned for tomorrow's joke too!

_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___: Why are keyboards always working so hard?

___A___: Cause they have two shifts!
 -->