teleren/devto huggingface dataset:
Live session: A first peek into the Kern AI refinery.
Tags: nlp, ai, machinelearning, livesession
Published: 2022-10-07 10:31:56

We are going live on Twitch! Have you ever thought about integrating refinery into your NLP projects but did not know where to start? On October 13th, Leonard and Moritz will give you a practical overview of the application with an easy-to-understand dataset. 

When? (CEST timezone)
- 6pm - 7pm: Livestream on twitch.tv/MeetKern
- 7pm - 7.30pm: Live Q&A on our Community Discord server

In the livestream you will learn:
👉 How to install refinery
👉 How to set up a project
👉 How to use all the features of refinery

Our CTO Jens will accompany the livestream and Q&A so that you can get all these burning questions off your chest.
We very much look forward to this, as we greatly value your feedback and engagement. Refinery was built to make your life easier and we think that sessions like this will help you get the hang of this fantastic application.

Sign up for the event now! See you next Thursday 🥳
The Productivity Tip That Changed My Life
Published: 2022-10-07 10:29:42

There is this weird chasm between thought and action where many dreams have died a sad death. I would, for years, get confused about handling tasks. If I have a list of tasks, I could either start without a plan and get some of them done haphazardly or sit down and come up with an idea and organize everything before I jumped into action. Both of these approaches had issues.

With the first method, I would get random stuff done, but they never added up to anything profound and valuable, and I would miss opportunities that I would have seen if I had taken time out to plan.

With the second way, I would freeze and would never get started and would soon begin procrastinating and would keep planning forever.

**The 2-minute rule**
This tip by David Allen, the author of getting things done, changed all that.

He argues that if I can do something in less than 2 minutes, I don’t have to put into a planning system like even a to-do list. The effort takes to put into a system and process. It is offset by the fact that I can do it not and finish it off. It never has to appear on paper anywhere.

Like just a while ago, I remembered that I had not paid my mobile phone provider bill. Instead of writing it down somewhere, I know that I could pay using the ISP’s app in under a minute. So I just went ahead and did that.

It turns out that many projects have a ton of “tasks” that take 2 minutes or less. Instead of making a “big deal” about them and putting them on a to-do list, you can do them when writing down the to-do list. So the act of writing the to-do list could be a trigger to finish a lot of 2-minute tasks.

It’s funny how many of my “Big projects” are held up because of this 2-minute task not done.

It happens especially when you start and also when you finish a project. These rules enabled me to code and launch my SAAS product, Proxies API in under a month. I teach this rule to every new hire I make in the company. It’s fun to get an instant boost in everyone’s productivity by showing them this. After all, it only takes 2 mins to teach them this.

The author is the founder of Proxies API, a proxy rotation api service.
Help to build a language for developing full-stack web apps with no boilerplate
Tags: hacktoberfest, javascript, webdev, react
Published: 2022-10-07 10:28:20

**TL;DR:** we’ve developed an open-source language for building full-stack web apps with less code and best practices that works alongside React and Node. Join us during HacktoberFest!

Hello everyone! We’re a small team of open-source enthusiasts, passionate about web development and extremely tired of writing boilerplate code. 

That’s why we created Wasp - an open-source web application configuration language that takes over all the routine work of creating a project backbone. You describe the application’s functionality (API endpoints, authorisation, deployment, etc.) in a single file. 

The compiler does the rest itself. The result is a full-fledged web app built with Node + React, created in a few minutes.  We are backed by Y Combinator and engineers from Airbnb, Facebook, and Lyft.

Wasp's compiler is built with Haskell and under the hood it generates a web application in React and NodeJS. Given that, **there are several ways in which you can contribute**:

- Wasp compiler/CLI/LSP internals (Haskell)
- Wasp as a web framework (React, Node, HTML/CSS, database and so on)
- Tutorials or Example apps
- Documentation

Given that we'll find a good first issue for anyone, no matter if you're an experienced dev or just a beginner!

[Here's an entry point for anyone who wants to contribute to Wasp during Hacktoberfest.](https://github.com/wasp-lang/wasp/issues/735)

**Tech stack: JS, Haskell**
One Year of Weekly Posts
Tags: writing
Published: 2022-10-07 10:26:04

This week’s post is special :) 

It marks one year since I started publishing technical posts on a weekly basis on dev.to.
Every Friday, over the last 52 weeks, I shared with you the ups and downs of my tech path. Not just handing off the final result, but writing as I go, putting you in the passenger seat next to me, as I ride through web technologies and development methodologies.

The previous milestone I mentioned in a post was “[20 weeks of consistent blogging](https://dev.to/mbarzeev/20-weeks-of-consistent-blogging-2d3e)”, in which I wrote about my process, challenges, benefits and achievements of sharing my learning process with you. About the point in time where it started to become more of a habit than a chore. 

The starting point post was “[Converting a React component to TypeScript](https://dev.to/mbarzeev/converting-a-react-component-to-typescript-15cl)” which was published on Oct 8th, 2021. There and then I decided I would like to pursue this goal, of weekly sharing my journey. 
I’ve been writing and publishing technical blogs for a long (long…) time, but this is the first time I took such a commitment upon myself, and I won’t tell you lies, sometimes writing a blog post describing a “battle” with some technology I was not familiar with up until that point is not the first thing you think of doing on a Friday morning (a vacation day where I come from).

There is no consistent theme over the posts, though most of them are focused around the Frontend side of things. I’m writing about what interests or occupies me at the moment. 
What keeps me going, aside from the fact that it encourage me to learn and **extend** my comfort zone (notice I didn't say “get out of my comfort zone” - there is a painful difference), are comments like [this one](https://dev.to/thojanssens/comment/225ik):

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

I’m a great believer that knowledge is true only when shared, and if I have the opportunity to share the things I learn and, by that, help others (or save them “hours and hours of research”) I’d be a fool not to take it.

> knowledge is true only when shared

What does the future hold? 
As long as I find new technologies which interest me, as long as I find better and simpler ways of doing stuff, as long as sharing the path I take excites me I will keep on publishing these posts. 

So… ready for the next round? Here we go :)

***

Be sure to drop and say hi <a href="https://twitter.com/mattibarzeev?ref_src=twsrc%5Etfw" class="twitter-follow-button" data-show-count="false">@mattibarzeev</a><script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script> and feel free to leave your comments below :beers:

<small><small><small>Photo by <a href="https://unsplash.com/@tevintrinh?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Tevin Trinh</a> on <a href="https://unsplash.com/s/photos/rest?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a></small></small></small>
Using jq to filter JSON data
Tags: json, jq, filter, api
Published: 2022-10-07 10:18:46

Basic Elements
- `.`
`.` - Same as input when used standalone,
`.key` - Value of the key

- `[]`
`[]` - Select array,
`[n]` - Select nth element in the array,
`[.key1, .key2, ..]` - Create new json object

- `{}`
`{key1: .key1, key2: .key2, ..}`
or
`{key1, key2, ..}` - Create new json object

n ∉ [0, ∞), int

Ex.

file.json
```
[
  {
    "id": 1,
    "name": "test1"
  },
  {
    "id": 2,
    "name": "test2"
  }
]
```

To filter ids:

```
$ jq '.[].id' file.json
1
2
$ cat file.json | jq '.[] | .id'
1
2
$ cat file.json | jq '.[].id'
1
2
```

To return value of `name` key when id is 1

```
$ jq '.[] | select(.id == 1) | .name' file.json
"test1"
$ cat file.json | jq '.[] | select(.id == 1) | .name'
"test1"
```

To filter ids as json

```
$ jq '.[] | {id}' file.json
{
  "id": 1
}
{
  "id": 2
}
$ cat file.json | jq '.[] | {id}'
{
  "id": 1
}
{
  "id": 2
}
$ cat file.json | jq '.[] | {id: .id}'
{
  "id": 1
}
{
  "id": 2
}
```



Ref. :
https://stedolan.github.io/jq/
https://programminghistorian.org/en/lessons/json-and-jq
Crown Clothing Web Store
Tags: webdev, react, javascript
Published: 2022-10-07 10:02:16

Hey, I created this [frontend for an ecommerce shop](https://peppy-marshmallow-6cffa5.netlify.app/) using React JS.

Being able to create and deploy this web application on Netlify is quite a milestone for me. This is because I was used to working in Java and PHP and learnt React quite recently.

I made use of function components, styled-components and sass, contexts, reducers, React Routes and several other React Hooks.


![Shopping Experience on Crown Store](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ta9xs3ir8nf0u76n25ui.jpg) 

For the authentication, Google Firebase was used while firestore was used as the NoSQL database.

In the coming weeks, I hope to add a Node Backend for orders and payment processing and then consume them using my Front End Application.

I also hope to add another Frontend Web Application for store administration.

You can view the application [here](https://peppy-marshmallow-6cffa5.netlify.app/)

I would sincerely love to get your feedbacks on this project.
I made a Landing Page Kit for Increasing Conversions and Overall Quality
Tags: design, webdev, opensource, showdev
Published: 2022-10-07 09:24:17

Hello guys,

I just finished and launched KyotoUI, my first Figma kit to help design better landing pages using high-quality pre-made components, optimized for better conversion rates.

Let me know your thoughts in the comments, looking for feedback on it 🙏🏻

Check it out here for FREE: https://www.figma.com/community/file/1159859774789253786

Official Website: https://www.kyotoui.com/
Angular: Top 5 Most Watched Videos in September 2022
Tags: angular, techtalks, tutorial, webdev
Published: 2022-10-07 09:06:20

Angular tech talks were in the spotlight this September with an overwhelming number of videos featuring experts from all over the world. This time we hand selected the [top 5](https://blog.meetupfeed.io/angular-september/) of them for you to pick up all you can. Enjoy!

[What is Angular in the Jamstack | Tara Z. Manicsic](https://meetupfeed.io/talk/what-is-angular-in-the-jamstack)
Let’s talk about the Jamstack architecture and where Angular fits! Learn what Angular is in the Jamstack, deep dive into pre-rendering, find out all about Static Site Generators and Content Delivery Networks and how Netlify comes into the picture.

[Error Handling – Complete Guide (2022) | Dmytro Mezhenskyi](https://meetupfeed.io/talk/error-handling-in-angular-complete-guide)
Unfortunately, errors happen in every application which makes error handling one of the most critical parts you have to focus on. Yes, we can’t get rid of errors completely, however, we can react to them and gracefully handle exceptions, improving the user experience in our apps. In this video, Dmytro will share with you different error handling strategies that will help you to solve 80% of possible scenarios that might occur in your applications. You will learn how to handle exceptions that happen in sync and async code, how Angular tracks errors, and how it globally handles it. You will see how errors are being handled by rxjs streams and how to use Angular HTTP_INTERCEPTORS to implement a global strategy for failed HTTP requests.

[CanMatch Guard in Angular 14.1 Router (2022) | Dmytro Mezhenskyi](https://meetupfeed.io/talk/can-match-guard-in-angular-14)
Second round of Dmytro…wow! Angular 14.1 comes with many useful features and in this video, we will have a look at one of them. Let’s talk about a brand-new CanMatch guard in Angular router that can help you to ‘skip’ routes depending on some certain conditions. This is quite different compared to already existing guards and brings even more flexibility to your apps.

[Getting Started with Standalone Components| Jessica Janiuk](https://meetupfeed.io/talk/getting-started-with-standalone-components)
Join the Angular team’s very own Jessica Janiuk as she guides us through the getting started with the brand new Standalone Components feature.

[Bringing Your Angular Web App to Native | Mike Hartington](https://meetupfeed.io/talk/bringing-your-angular-web-app-to-native)
So, you have a killer app you’ve built and want to take it from your web browser to the App Store. Sure, there are a lot of options here, but most will require you to maintain separate apps for each platform. You want your codebase to be as close as possible across Web, Android, and iOS. Thankfully, with Capacitor, you can take your existing web app and quickly create native iOS and Android apps for distribution on your favorite App Store.
Null ใน JavaScript
Tags: javascript, webdev, beginners
Published: 2022-10-07 09:12:45

หลังจากเสียตังให้กับ [Just JavaScript](https://justjavascript.com/) ก็ได้รู้ว่า null มันคือหนึ่งใน primitive values แต่ !! เมื่อเราใช้ `typeof` ในการตรวจสอบจะพบว่ามันบอกว่าเป็น `object` !!

```
console.log(typeof(null));
:> object

console.log(typeof(undefined));
:> undefined
```

แล้วทำไมมันไม่เป็น null เช่นเดียวกับ undefined เพื่อนใกล้เรือนเคียง
คำตอบคือมัน `bug` !!

และหากจะไปหวังว่าผู้พัฒนาจะแก้มัน ก็น่าจะยากมาก ๆ
Introduction
Tags: opensource
Published: 2022-09-06 14:01:17

Hello,

My name is Stefan Frunza and I am in my final year in the CPA program at Seneca and have already completed both of my CO-OP terms with the Ontario Ministry of Transportation.

Incidentally my interest in Open Source stems from my CO-OP where I was exposed to the Aries Cloud Agent Python, or ACAPY for short that the BC government had been working on.
https://github.com/hyperledger/aries-cloudagent-python

Part of my job was to be a developer on a controller that should interact with these ACAPY agents and I found it interesting that practical use for hyperledgers had been found in creating decentralized identity applications. Having something this practical, interesting and large be open source and to be able to build a few agents from their docker images so easily to make them interact with one another was really cool and was probably the starting point of my interest.

If I had to pick something right now that I would like to work on it would be something like the ACAPY because it did leave me impressed and it was cool to come in contact with. Mostly though I would choose something in decentralized identity I suppose because I have a bit of exposure to it, it's ever so slightly less daunting than other areas I am completely blind to.

It might be fun to work on an open source game if I could find one and try something new, or if I were really confident in my abilities perhaps I would try something like the following repo that I forked for this blog post as per the instructions:
https://github.com/sfrunza13/EasyMocap (this is the fork)
https://github.com/zju3dv/EasyMocap (this is the original URL)

The reason I picked this repo is because I can see this practically changing the world in many ways and it's not often that you are instantly struck with that kind of instantaneous realization when looking at a project. For example there was a neat project I also saw that was about creating an HTML view for atoms and how they would interact with one another to simulate the creation of life which is cool and although the implications as to how that might change certain industries may exist it did not immediately slap me in the face. However, when looking at this motion capture technology that can be achieved through a few cameras or through existing videos of subjects in motion it was instantly apparent to me that the entertainment industry in movies, marketing, video games and beyond could change given more intuitive and perhaps affordable ways to perform motion capture.
Django API Generator - Free Tool (Updated)
Tags: django, devtools, opensource
Published: 2022-10-07 08:45:42

---
title: Django API Generator - Free Tool (Updated)
published: true
description: An open-source tool that generates secure APIs on top of Django and DRF - Sources published on GitHub under MIT License.
tags: django, devtools, opensource
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gqx5kxpp613r97n5n81v.jpg
canonical_url: https://blog.appseed.us/django-api-generator-free-tool/
---
Hello coders!

This **open-source** tool has been updated to provide a sample API-View page that allows interaction with the generated (API) Service. Once [Django API Generator](https://github.com/app-generator/devtool-django-api-generator) starts, the generated API can be used in two ways: using 3rd party tools like POSTMAN and also in the application pages using JS code that implements all CRUD requests. Being released under **MIT License**, the source can be incorporated into other projects (open-source or commercial). 

> Thanks for reading!

- 👉 [Django API Generator](https://github.com/app-generator/devtool-django-api-generator) - `Source code`
- 👉 [Support](https://appseed.us/support/) page (just in case)

---

The fastest way to use the tool is to start it in Docker via a single command:

> 👉 **Step 1** - Download the code from the GH repository (using GIT)

```bash
$ git clone https://github.com/app-generator/devtool-django-api-generator.git
$ cd devtool-django-api-generator
```

> 👉 **Step 2** - Start the APP in `Docker`

```bash
$ docker-compose up --build
```

Visit `http://localhost:5085` in your browser. By default, a simple [Books](https://github.com/app-generator/devtool-django-api-generator/blob/master/apps/models.py) Model is used as a sample.

- The **generated DRF API** is live at `http://localhost:5085/api/books`
- Registered users can interact with the API using the `API-View` page 

![Django API Generator - API-View Page (free tool)](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c9613xql09cnesphbvoh.png)

A video presentation that explains the product, the relevant parts of the source code, and how to define and generate a new API can be found on YouTube:

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

--- 

> Thanks for reading! For more resources, feel free to access: 

- 👉 More [Django Dashboards](https://appseed.us/admin-dashboards/django/) - a curated index 
- 👉 [Django App Generator](https://app-generator.dev/django/) - A 2nd generation App Builder
This Week In Python
Tags: python
Published: 2022-10-07 08:41:57


**Fri, October 07, 2022**


This Week in Python is a concise reading list about what happened in the past week in the Python universe. 


## Python Articles


- [Production Tips for Django Apps](https://raunaqss.com/engineering/django-production-tips/)
- [Pytest for Beginners](https://testdriven.io/blog/pytest-for-beginners/)
- [Developing RESTful APIs with Python and Flask](https://auth0.com/blog/developing-restful-apis-with-python-and-flask/)
- [Animate a Math Object With a Trace Path Using Python Manim Library](https://www.instructables.com/Animate-a-Math-Object-With-a-Trace-Path-Using-Pyth/)
- [Intro Computer Science with Python: 7-week course](https://benrosenberg.info/introcs-course/index.html)




## Projects


- [red-box](https://github.com/Miksus/red-box) – Next generation email box manager
- [taskipy](https://github.com/illBeRoy/taskipy) – complementary task runner for python
- [zython](https://github.com/sagemathinc/zython) – WebAssembly Python for servers and browsers. Built using Zig
- [isort](https://github.com/PyCQA/isort) – A Python utility / library to sort imports 
- [minestrone](https://github.com/adamghill/minestrone) – Search, modify, and parse messy HTML with ease
This SQL solution is GENIUS!!🤩
Tags: sql, mysql, leetcode, database
Published: 2022-10-07 08:06:31

I recently started off solving SQL problems on Leetcode and I come across atleast one problem every day whose solutions I think are **pure genius**. 

It's one such problem I came across today which I'll discuss below, 

[Databases (608. Tree Node)](https://leetcode.com/problems/tree-node/)
------------------------------

**Problem statement**
We need to find the type of each node in a tree. Whether it's a root, inner or a leaf node. 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l6s5vu4axj459xawqfsr.png)

```
Input: 
Tree table:
+----+------+
| id | p_id |
+----+------+
| 1  | null |
| 2  | 1    |
| 3  | 1    |
| 4  | 2    |
| 5  | 2    |
+----+------+
Output: 
+----+-------+
| id | type  |
+----+-------+
| 1  | Root  |
| 2  | Inner |
| 3  | Leaf  |
| 4  | Leaf  |
| 5  | Leaf  |
+----+-------+
```
`Checkout the description thoroughly from the link above and try get an idea of solving it before checking out below approaches`

1. My approach 
-----------

I solved it using `CASE`. 
I don't want to go into nitty gritty details of it but here's an overview,
**1.1** If p_id is null, then it's a **Root** node.
**1.2** If id is in p_id, then it's an **Inner** node.
**1.3** Else, it's a **Leaf** node.

2. [Genius approach](https://leetcode.com/problems/tree-node/solution/) (Atleast I think)
---------------

Using `If` function

Here's the code,
```
SELECT
    atree.id,
    IF(ISNULL(atree.p_id),
        'Root',
        IF(atree.id IN (SELECT p_id FROM tree), 'Inner','Leaf')) Type
FROM
    tree atree
ORDER BY atree.id
```

Let's break it down,
1. Sets `atree` as an Alias to our Tree table.
2. Selects `id` from the Tree table.

**Here's what's interesting!!!!**
3.Creates an If function
```
General usage of If function 👇

`If(10>27, YES, NO)` 
It states that if condition `10>27` is true then **YES** else **NO**.
```
Now, 
`IF(ISNULL(atree.p_id),'Root'`
states that, 
if `p_id` is null, then set it as **Root**.
(And just like that our condition from **1.1** was satisfied)
4.Yet another If function embedded inside the `first If function as an Else condition`,
`IF(atree.id IN (SELECT p_id FROM tree), 'Inner','Leaf')`
This states that,
If `id` is in `p_id` set it as 'Inner' else as 'Leaf'.

(And just like that our conditions 1.2, 1.3 were satsified🤩)

> _The genius behind this solution is designing it by utilizing of simple functions ordered in a perfect way._
> _As complex as it may seem, as simple it is I believe._

If you made it till here, let me know what you think of this and also mention down in the comments if there are any more problems/solutions you find interesting.


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