teleren/devto huggingface dataset:
One thing to do before Git Rebase to other branch
Published: 2022-08-12 12:55:00

When rebasing, Git will iterate each commits since the divergence. 

If there is a conflict in a commit, it stops and wait for the conflict to be resolved. After resolving the conflict, we can “Git rebase —continue” to resume the process.

It can be confusing to see stale changes and resolving conflict with stale changes again and again is not fun.

The one thing to do before rebasing to other branch is: squash or fix up commits into one commit so that when you resolve conflict, it is against the latest changes and you only have to do it once.

To squash the commits: “Git rebase -i HEAD~5”, replace the number 5 to the number of commits you intend to squash.
We are trending on Github, This is how we did it 🤯
Tags: discuss, javascript, webdev, productivity
Published: 2022-08-12 12:44:00

## We are trending on Github!
To be honest, Github has an extraordinary algorithm, and it's pretty impossible to know what going on back there.
We do have a slight feeling I want to share with you today!

Before we start, I would be thrilled if you could help me by starring ⭐️ our library Novu! So we can keep on being Trending.

https://github.com/novuhq/novu

We know that to be trending, you must have a lot of pinpoints that lead to your library with some activity. That can be a Github star, Issue, Pull request, etc.

Everything is thanks to this fantastic DEV community and the open-source community!

## Articles
We started last week with an article on dev.to that got super Trending!
[How to build a real-time Auction System with Socket.io and React.js 🤯](https://dev.to/novu/how-to-build-a-real-time-auction-system-with-socketio-and-reactjs-3ble)

This article became so trending that we got on daily.dev, retweeted/posted on many other websites.
And then the follow-up of the series got a lot of traffic also
[How to build a real-time Auction system - Connecting Socket.io With React 🔥](https://dev.to/novu/how-to-build-a-real-time-auction-system-connecting-socketio-with-react-20kh)

So that was awesome!
We also released our article about open-source:
[How to raise funds for an open-source company 💵](https://dev.to/novu/how-to-get-funds-for-an-open-source-company-1996)

Just to share a bit of detail:
![Details](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bcnprfz20o721bi769tn.png)

![Details 2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gue5y868hwbik8bzx8sa.png)

![Results](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6jsfyzmiqp8kpou5tjom.png)

## Twitter
We got tweeted by Vercel founder Guillermo Rauch. Totally unexpected 🙏🏻.
And got many more tweets and retweets. 
![Guillermo Rauch](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ffu3md1obccp88o6393y.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5hvlhaq5vu95vx2mrg1q.png)

## Reddit
We posted on Reddit that we are trending, got many more stars, and moved from trending on Typescript to global Trending.
![Reddit](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s995v4t1r4mp6jmpd5fx.png) 

## In conclusion
We didn't plan that, but we are super excited that it happened to us. We hope it will last for a long time. It really helps Novu and the community to grow ⭐️
If you can help us with a star, that would be amazing!
https://github.com/novuhq/novu
![Helo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8dpi6s8yuw9es8vs7ytu.gif)
Just released an update of my app.
Tags: flutter, android, productivity, news
Published: 2022-08-12 12:33:03

Hey guys, I hope you are all doing great.

I have some great news, I have just released a update for my app Koduko: A habit tracker.

To know more about the app, you can check out the previous post
[here](https://dev.to/mazahir26/i-made-yet-another-habit-tracker-in-flutter-5bkc).

App link : [here](https://github.com/Mazahir26/koduko/releases)
Source Code : [here](https://github.com/Mazahir26/koduko)

I do wish to release it on F-droid, if anyone could help me out please let me know.


Feedback and feature request will be appreciated.
Thank you 😁.
Importance Of Indentation In PYTHON | apcode
Tags: python, beginners, programming, tutorial
Published: 2022-08-12 12:33:00

Hi, I am Abhishek. Today, in this article I am going to talk about what is indentation and how important it is in Python programming language. In other programming languages, curly braces are used instead of an indentation.

## What is the indentation ?
In Python indentation is nothing but the amount of whitespace before a statement. Indentation is used in Python to define the scope of a code block.

## What is code block ?
In a python program a set of statements that has a special means can be considered as code block. For example-

![code-image1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/101z6ow49stwo674wreo.png)
 

Here we have two code blocks-- an if-block and an else-block. 

Now both the print statement should have the same amount of space before them to be in the respective code blocks. 

If the number of space changes, an error will be generated by the Python interpreter.
![code-image-2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4ib0u5d3hhk6w8dg7vgt.png)

### Output:
![error-image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6j3pyubomlnvx1uh7sv6.png)
 
 
> NOTE: You can have any number of spaces before the statements in a code block. But for one block the number of spaces should be the same. And at least one space is required to define a code block.  


I hope you got a clear idea about how and why indentation is used in the Python programming language. Thank You !
Collect Realtime Stack Traces from NodeJS Applications
Tags: javascript, node, docker, api
Published: 2022-08-12 12:16:46

> Whether you are working on a dev branch or prod, you can now remotely debug your running Node.js applications using Sidekick’s web IDE.

In this post, I’ll show you how you can quickstart collecting stack traces from your Node.js applications using Sidekick. All without restarting & redeploying.

![](https://miro.medium.com/max/1400/1*onbmmERKyQ_QKkIbJ9ToIw.png)

To keep everything nice and short I’ve started with the Hello World example from Express.js’ website. ([http://expressjs.com/en/starter/hello-world.html](http://expressjs.com/en/starter/hello-world.html))

Then I plugged in body-parser and added a new endpoint to demonstrate what you can achieve in a few seconds.

```
const express = require('express')  
const app = express()  
const port = 3000  
const bodyParser = require('body-parser')  
  
app.use(bodyParser.json())  
  
app.get('/', (req, res) => {  
  res.send('Hello World!')  
})  
  
app.post('/:id', (req, res) => {  
    let body = req.body  
    res.json(req.body.foo)  
  })  
  
app.listen(port, () => {  
  console.log(\`Example app listening on port ${port}\`)  
})

```

So as you can see, my new endpoint is returning a part of the request body. Now we will use Sidekick to observe more and see what other information was included in the request body.

First, we will install our Sidekick Node.js agent.
`
npm install @runsidekick/sidekick-agent-nodejs
`
Then we will sign in to our Sidekick account and copy the API Key of our workspace.

> Sidekick comes with a 7-day free trial so you can use this link to sign up and follow along with this article.
> 
> ‍[https://app.runsidekick.com/](https://app.runsidekick.com/)

Then we will add the Sidekick agent on top of our project. Final code will look like this.

```
const SidekickDebugger = require('@runsidekick/sidekick-agent-nodejs');  
  
SidekickDebugger.start({   
    apiKey: 'your-sidekick-api-key'  
});  
  
const express = require('express')  
…

```

And we are good to go. Now we can run our application and start observing its state on the go.

To put your first tracepoint, head to [app.runsidekick.com](https://app.runsidekick.com)

Select your running application.

![](https://miro.medium.com/max/1400/0*7KAr7cqFdrHB6_Xl.png)

Add your tracepoint and call your endpoint to collect related data.

![](https://miro.medium.com/max/1032/0*9VdQfI92VpmXffiY.png)

![](https://miro.medium.com/max/1400/0*43w2DF3c329ETf8Z.png)

‍

There you go, now that you have collected your data you can observe what is going on behind the curtains.

![](https://miro.medium.com/max/1400/0*1oCHGB0R2lx-S919.png)
(checkout the initial image for the zoomed in version)

As you can see starting with Sidekick is a breeze.

If you liked this article and learn more about [**Sidekick**](https://marketplace.visualstudio.com/items?itemName=Sidekick.sidekick-debugger) you can check out our [docs](https://docs.runsidekick.com/) and start using it right away!
This Week in Python
Tags: python, discuss
Published: 2022-08-12 12:14:30


**Fri, August 12, 2022**


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


## Python Articles

- [Adding auditing to pip](https://lwn.net/SubscriberLink/904197/9f5cc13b3c352127/)
- [How to Choose the Right Python Concurrency API](https://superfastpython.com/python-concurrency-choose-api/)
- [Python in Visual Studio Code – August 2022 Release](https://devblogs.microsoft.com/python/python-in-visual-studio-code-august-2022-release/)
- [How I added C-style for-loops to Python](https://sadh.life/post/cursed-for/)
- [Uncommon Uses of Python in Commonly Used Libraries](https://eugeneyan.com/writing/uncommon-python/)


## Projects

- [jnumpy](https://github.com/Suzhou-Tongyuan/jnumpy) – Writing Python C extensions in Julia within 5 minutes
- [log-booster](https://github.com/nvinayvarma189/log-booster) – A VS code extension to quickly add frequently used log statements
- [schemathesis](https://github.com/schemathesis/schemathesis) – Run generated test scenarios based on your OpenAPI specification
- [makepackage](https://github.com/nyggus/makepackage) – Package for easy packaging of Python code
- [flet](https://github.com/flet-dev/flet) – Flet enables developers to easily build realtime web, mobile and desktop apps in Python
Introduction to UX Design
Published: 2022-08-12 11:56:00




![pink background](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tssluxtp98n7hmlx451m.png)
_UX design is much more than just sketching where a button should appear on a web page._

## What is UX design?

> User experience (UX) refers to a person’s emotions and attitudes about using a particular product, system or service. It includes the practical, experiential, affective, meaningful and valuable aspects of human–computer interaction and product ownership.

 From Wikipedia, Free encyclopedia

_UX designers are more concerned with how the product feels, they basically make the world a more user friendly place._

**UXD seeks:**   
- to ask 'why we need the product'

- to answer 'how to build the product'

- to focus on the product 'what it is going to look like'

### The 'why'?

1. Do users require the product you are making?

2. Do they want it enough such that they are willing to pay for it.

3. Are the users captivated enough by your product such that they are capable of investing their time discovering it if  it were free?

4. Is there a key feature missing that is needed by the user?

5. Are you building features that will never be used?

### The 'How'?

1. How to improve efficiency by determining how the content should be organised for easier navigation. 

2. How simple is your product? Can users find what they want without getting lost?

### The 'What it is going to look like'?

1. The product first impression matters a lot.Is the product visually appealing?

2. Does it set the tone for its purpose?

3. Is it usable and readable? Can the users trust it? 

> Systems that confuse, intimidate or infuriate their users don’t have flawed users, but flawed designs that need to be fixed.<br>
    -From Ben Le Ralph
A GitHub Trending Client that Lives in your Menubar
Tags: github, javascript, react, programming
Published: 2022-08-12 12:14:00

Hey guys,

Lately, I have been learning Electron and I am amazed by how powerful it is to build a desktop app. To help myself learn more about it, I created an app called Raise, a simple GitHub Trending client that lives in your menu bar.

To install Raise, please download it from GitHub Releases:

[https://github.com/meetyan/raise/releases](https://github.com/meetyan/raise/releases)

This project is open-source so if you have any problems, feel free to submit an issue!


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


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nghlopuie7b6lrkefi8x.png)
Laravel named query arguments
Tags: laravel
Published: 2022-08-12 12:11:43

When writing a query it's common to use closures when using [advanced clauses](https://laravel.com/docs/9.x/queries#advanced-where-clauses) or [grouping conditions together](https://laravel.com/docs/9.x/queries#logical-grouping) in-order for the query to behave as expected.

```php
$users = DB::table('users')
           ->where('name', '=', 'John')
           ->where(function ($query) {
               $query->where('votes', '>', 100)
                     ->orWhere('title', '=', 'Admin');
           })
           ->get();
```


With more complex queries which have numerous closures the repeated use of the `$query` argument can make readability awkward. 

```php
$users = DB::table('users')
           ->where('name', '=', 'John')
           ->where(function ($query) {
               $query->whereHas('role', function ($query) {
                   $query->whereIn('slug', ['leader', 'deputy'])
                        ->whereHas('team', function ($query) {
                            $query->whereIn(
                               'slug', 
                               ['sales', 'finance'],
                            );
                        });
               });
           })
           ->get();
```

By replacing the `$query` arguments with a variable named as per the table's name, eg `$teams`, the methods then appear prefixed with the table they're operating on which can make things feel more fluent.

```php
$users = DB::table('users')
           ->where('name', '=', 'John')
           ->where(function ($users) {
               $users->whereHas('role', function ($roles) {
                   $roles->whereIn('slug', ['leader', 'deputy'])
                        ->whereHas('team', function ($teams) {
                            $teams->whereIn(
                               'slug', 
                               ['sales', 'finance'],
                            );
                        });
               });
           })
           ->get();
```

This approach also helps when scanning over many lines or reading things out of context, for example when trying to debug a certain query's conditions.

```php
// Need to add the "senior-managers" 
// to the condition for the teams table

// Could this be the right condition,
// which table's slug is this?
$query->whereIn(
   'slug',
   ['sales', 'finance'],
);

// If the query argument has been named,
// then we immediately know which table it is 🙂
$teams->whereIn(
   'slug',
   ['sales', 'finance'],
);
```
Workout data customized for me
Tags: ios, swiftui
Published: 2022-08-12 12:06:41

This is a sharing of what I am studying.

I use my apple watch to get data on my cycling and running. The process to produce monthly stats does not exist in the default app, so I make it myself.(I'm also learning SwiftUI.)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cr1r3oxx92ardke1cys2.png)
 
https://github.com/tokizuoh/contrail
5-phases of Design Thinking
Tags: ux, design, beginners
Published: 2022-08-12 12:03:51


![insight image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g54nsd1f0a31q8271tut.jpeg)
#### **What is design thinking?**

> design thinking is a human-centered approach to innovation that draws from the designer’s toolkit to integrate the needs of people, the possibilities of technology, and the requirements for business success.

   — TIM BROWN, EXECUTIVE CHAIR OF IDEO
#### There are 5 steps involved:

**_1. Empathize:_**
This is the first stage that entails you to understand the people you are designing for. Understand what their problem is and gather information required through interviews and/or other means.

**_2. Define:_**
Here you need to break down the users needs or problems based on the information you have gathered from the first step.

**_3. Ideate:_**
Come up with thoughts and ideas that are potential matches based on the insights got from the 2 previous steps.

**_4. Prototype:_**
Take the ideas you want to develop and turn them into simple testable prototypes.

**_5. Ideate:_**
Test the prototype with real users. You are not done yet until you get more insights from the users about something that needs to be addressed. Once that is done, repeat the cycle again from start to end.

#### It is worth noting:
- The steps above are just a zoomed out map of what is needed to be done over a period of time. There are no rules set that you have to do a certain thing like is the case in design sprint. 
- While design sprint is more of a recipe, design thinking is a philosophy and a mindset combined with multiple different exercises.
What is binary search?
Tags: algorithms, beginners, programming, webdev
Published: 2022-08-12 11:48:57

Some time ago during the job interview for an SDET role, I was asked how I could efficiently find an element in a sorted collection.

I didn't know! No wonder I didn't get the job. So what was the answer?

In fact, there're only two searching algorithms out there:
1) Simple search (just check every element until you find needed)
2) Binary search (that was the one I didn't know)

👉Binary search is a fast way of finding items in a list based on a search term. Suppose you have a list of names and you want to find out if a specific name is present in that list. You can use binary search to find that name as quickly as possible.
👉Binary search can be used to find items on almost any kind of list – a grocery list, a list of movies, a list of stocks, or a list of anything.

The idea is fairly simple and is quickly demonstrated in the picture below:

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

In contrast, here’s how the simple sequential search would work:

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

By the way - here are 5 reasons learning algorithms will make you a better developer: https://www.youtube.com/watch?v=rGbWHujTeic
Fetch and display video directly from google drive with url in 4 easy steps
Tags: javascript, webdev
Published: 2022-08-12 11:46:00

I recently made a web app with React, and I needed to display some of my client videos. As google drive is free up to 15GB, this was a perfect fit.

The problem was that there were no easy solution to fetch and display the videos stored on our google drive account. Here were the options I found:

- **Embed item**
This was an easy quickfix, but when embedding from google drive, you also get their own video player. Here you have a link to the video on the google drive account, which can be a security risk as people may find a way to access your google drive account/page. 


- **Google drive api / Google picker**
This was my first thought, but I quickly realised that would have taken too much time to dive into that ocean of documentation (basically, i'm lazy). 


- **Get URL and use in "src" attribute**
There were many differents suggestions on StackOverflow, some of them I tried but they didn't work. But I found one really straight forward way to do it. 
 

## Find URL of video and insert into the "src" attribute
This was by far the easiest method. You simply find and edit the video url, and insert it into your Html/React code. Here is how:

**1 - Make link/folder public**
First, we need to give the public permission to see the videos. Navigate to your Google drive folder. Click on the folder-name to open a menu. Here, click on "Share". Then, on the bottom, select "Anyone with a link", then close the window. 

![Make folder public](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oqy7c0w04xznqennjk27.png)

**2 -  Open video in "new window"**
In your folder, double click on the video to open it. Then, in the top right corner, click on the "3 dots" icon to open a menu. Almost at the bottom, click on "Open in new window".


![Open video in new window](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h7hpdqpr0hta7s8cu0ci.png)

**3 -  Edit the URL**
Now copy the URL in the newly opened window. It will look something like this: 

`https://drive.google.com/file/d/1APSRoW8XLWShNkeuC7--84XSoyMdcPrP/view`

Now, we are going to make 2 changes to this url. You can do it directly in the browser url bar:

- First, delete this part:
 
`file/d/`

and replace it with this instead:

`uc?id=`

- Secondly, delete the last part of the url:

`/view`

Now your url should look like this:

`https://drive.google.com/uc?id=1APSRoW8XLWShNkeuC7--84XSoyMdcPrP`

**4 - Insert url in "src" attribute**
Now, in your code, add a video element and paste in the url into the "src" attribute:

```
<video 
 src="https://drive.google.com/uc?id=1APSRoW8XLWShNkeuC7--84XSoyMdcPrP" controls>
</video>
```

That's all, folks!
ankara bahçelievler çilingir anahtarcı
Tags: bahcelievlercilingir, bahcelievleranahtarci
Published: 2022-08-12 11:42:26

Evlerimize girmemiz sırasında kapı anahtarının kırılması herkes için sıkıntı yaratan bir durumdur. Bu durumu düzeltmek için çilingir firmalarından hizmet alınır. Firmamız [Bahçelievler çilingir](https://ankaracilingirim.com/ankara-bahcelievler-cilingir-anahtarci-05535663113/) alanında hizmet sunuyor. Evlerinizde, iş yerlerinizde veya diğer mekânlarınızda anahtar ile ilgili herhangi bir sorun yaşadığınızda firmamızı tercih edebilirsiniz. Acil hizmetlerimizle yaşamış olduğunuz mağduriyeti hızlı bir şekilde gidermekteyiz. 

Anahtar ve kilit sistemlerinde ortaya çıkan her türlü arıza ve sorunda firmamıza ulaşabilirsiniz. Kapı kilitleri değiştirme, anahtar yedeği yapma, kırık anahtar çıkartma ve daha birçok hizmet için [Ankara Bahçelievler çilingir](https://ankaracilingirim.com/ankara-bahcelievler-cilingir-anahtarci-05535663113/) firmamızdan destek alabilirsiniz.

Kapı kilitlerinizi yenilemek, tamir ettirmek ve anahtarlarda oluşan tüm bozuklukları tamir ettirmek için [Bahçelievler çilingir ](https://ankaracilingirim.com/ankara-bahcelievler-cilingir-anahtarci-05535663113/)firmamızı tercih edebilirsiniz.

_https://ankaracilingirim.com/ankara-bahcelievler-cilingir-anahtarci-05535663113/_
ankara çilingir anahtarcı
Tags: ankaracilingir, anahtarcicilingir
Published: 2022-08-12 11:38:10

[Ankara çilingir](https://ankaracilingirim.com/) olarak Ankara ilçeleri ve semtlerinde en iyi uygun fiyatlı çilingir ve anahtar işleriniz için tecrübeli personelimiz ile siz değerli Ankara’lıların hizmetinizdeyiz. Ankara anahtarcı olarak hızlı servis temiz işçilik uzun senelere dayanan işbirliğmiz ile özel, yaratıcı çözümler sunmakta aynı zamanda çilingir taleplerinizi hızlı, esnek bir şekilde cevap vermekteyiz. Güvenilir hizmet. Profesyonel usta kadrosu. Elverişli fiyatlar. Çilingire ihtiyaç duydunuz her zaman [Ankara çilingir](https://ankaracilingirim.com/) 7/24 hep sizin yanınızda. Verdimiz hizmetler Kapı açma işlemleri, kilit değişim işlemleri, oto kapısı açma işlemleri, ev oda kapıları açma işlemleri, anahtar çekme, kumanda kopyalama ve bunlara alakalı aklınıza gelen bütün işlemler için sizlere yardıma hazırız.

[https://ankaracilingirim.com/](https://ankaracilingirim.com/)