teleren/devto huggingface dataset:
FastStream - A Video Streaming Server in FastAPI(Python) and SQLModel(SQLAlchemy)
Tags: python, fastapi, sqlalchemy, sqlmodel
Published: 2021-11-01 04:05:38

> FastAPI is a modern, fast (high-performance), web framework for building APIs with Python 3.6+ based on standard Python type hints.

Today i am going to open source a simple authentication based video streaming server.

## Features


### Authentication
- Signup
- Login
- Get current authenticated user



### Videos
- Create new video
- Get paginated videos 
- Get video by video id
- Delete video by video id
- Update video
- Stream video
- Add and Remove like on video




### Users
- Get paginated users
- Get user bu user id
- update user data
- delete user ( delete account )


FastStream store video file inside static directory and stream video chunk by chunk.


{% github harshmangalam/faststream-server %}


### Auth Service

![auth](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/94pbo3u5e2zdx9hhepdr.png)


### Videos Service

![videos](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ty3mvkmscrjvhhvh2lov.png)


### Users Service

![users](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/irf4hqmn6kel0ksh3ssg.png)
SPO600 - 6502 Assembly Language Bitmap
Published: 2021-11-01 03:53:22

During the introduction to 6502 assembly language lecture, we have first introduced with the X and Y registers and accumulator. Also, we have take a look into how to move around the bitmap and change the colour of the pixel .

In the following code, I have try to load 3 different colours into the accumulator and registers then draw 9 pixels into the bitmap as an excise on how to move the pixels around.

***Result***
![result](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mb1tcxxa4skcwjc52awd.jpg)

**Source Code**
```
LDA #01
LDX #07
LDY #03

STA $0200
STX $020f
STY $021f

STA $0400
STX $040f
STY $041f

STA $05e0
STX $05f0
STY $05ff
```

**Opcode**
LDA: LoaD Accumulator
LDX: LoaD X register
LDY: LoaD Y register

STA: STore Accumulator
STX: STore X register
STY: STore Y register
SPO600 Lab1 - Code Review
Published: 2021-11-01 03:53:03

The open source projects required a license which specifies the authorization that everyone in the community has in order to contribute and make change to the code.

In this lab, I will be look into two open source projects each with different licenses and observe the code review process on how the contributors can contribute to the project. 

**DuckDuckGo iOS Application**

DuckDuckGo is an internet search engine that licensed under the Apache 2.0 license. 

To contribute to this project, contributors can either report an issue or require to create a pull request with a fix in their [GitHub page](https://github.com/duckduckgo/iOS) with detailed description stated. Once one of the reviewers has reviewed the code and approved the changes, the code will be merge into the main branch.

There are two participants in this [pull request](https://github.com/duckduckgo/iOS/pull/980), one is the contributor and one is the reviewer. The whole process take up 3 days to add a JS prompts support to the application. The contributor creates the pull request first, then the reviewer will review the code and provide some feedbacks. Once the code is fixed and approved, the code will be merged into the main branch.

**Mikro-Orm**

Mikro-Orm is TypeScript ORM for Node.js application that licensed under the MIT license.

To contribute to this project, contributors can either report an issue or require to create a pull request with a fix in their [GitHub page](https://github.com/mikro-orm/mikro-orm) with description stated. Once the reviewer has reviewed the code and approved the changes, the code will be merge into the main branch.

There are two participants in this [pull request](https://github.com/mikro-orm/mikro-orm/pull/2305), one is the contributor and one is the reviewer. The whole process only takes up less than an hour to fix a missing type issue. The contributor creates the pull request first, then the reviewer will review the code and request changes to the fix code. Once the code is fixed and approved, a code coverage comment bot will come and show the code coverage result in the comment then the fix code will be merged into the main branch.
Tail Call Recursion
Published: 2021-11-01 03:52:04

What is tail call recursion/optimization? 
Tail Call Optimization is related to a specific type of optimization that can occur with function calls. According to Kyle Simpson, a tail call is a function call that appears at the tail of another function, such that after the call finishes, there’s nothing left to do.

Tail code optimization takes a recursive function and generate an iterative function using “goto” internally, and then execute it. It does not limit the stack calls because there are none and the function is not a recursive function more. The performance of this iterative function is equivalent to its recursive function.

In other words, tail call optimization means that it is possible to call a function from another function without growing the call stack. This is useful for large code bases.
removing the white node 
Tags: opensource, javascript, node, webextension
Published: 2021-11-01 03:50:46

This is my first open source and hacktoberfest contribution. I was very nervous before finding any issue that I can start with. After exploring a lot of repos and issues, I decided to work on this one.

## Project
The project name is [refined-github](https://github.com/refined-github/refined-github). refined-github is a web-extension which enhances the look and feel of your GitHub in browser. It simplifies the GitHub interface and adds useful features like add one click merge conflict fixers, button to revert all the PR changes and many more. 

## Issue
The project is actively developed and maintained with over 130 open issues and 10 PRs. I choose to work on issue([#4871](https://github.com/refined-github/refined-github/issues/4871)) which shows an unwanted underline over white-node on hover which is happens when there is anything after the copy button(see picture for more clarification)

![actual](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bkyfewe9uh4yb0bmssxq.png)
this is how it is right now, notice the unwanted underline on hover.

![expected](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y4pozftqzrrcvlazorqp.png)
This is how it should actually be.

## Starting to work
I forked the repo, and then cloned it. I followed the instructions in the contributing.md file which mainly told how to start and test the web-extension locally. I then created a branch for it and started to work for the solution.

## finding the solution
Although the total code added/remove was not much, solving this issue took pretty decent discussion of me and the project maintainers. It was difficult to remove the whiteNode generated unintentionally, so the fix had to be such that do not allow it to generate. After some research online and discussion with project maintainers, I figured out that fixing CSS properties can help. 

```
/* Remove the underline on PR filename copy button hover #4871 */
.file-header .file-info clipboard-copy {
	display: inline-block;
}
```
The main solution is this which do not allow it to generate a new whiteNode. Later, I fixed other code affected by adding this CSS property and the issue was solved.

## Pull Request
I then made my [pull request](https://github.com/refined-github/refined-github/pull/4875) ready for review and it was reviewed and merged to the main branch of the project. The edited code is now live!!
How To Validate Max File Size Using Javascript
Tags: javascript, file, validation, tutorial
Published: 2021-11-01 03:26:25

In this tutorial I will give you example of how to validate max file size using javascript, Some time we have requirement to check validation of maximum size of file before uploading in server or using javascript check validation of max file size upload. So, we will perform example of upload max file size validation in javascript.

In this example we are use on change event and check file length with file size. and display error message if file size is max given size else display success message.

```
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>How To Validate Max File Size Using Javascript - techsolutionstuff.com</title>
  <link href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" rel="stylesheet">
  <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>  
</head>
<body>
  <h3 style="text-align: center;margin-top:50px">How To Validate Max File Size Using Javascript - techsolutionstuff.com</h3>
  <div class="col-md-6 col-md-offset-5"><br>
  <input type="file" name="file"  id="filesizecheck"><br>
  <span id="error-message" class="validation-error-label"></span>
  </div>
</body>
</html>
<script type="text/javascript">
  $(document).ready(function(){
    $('#filesizecheck').on('change',function(){
      for(var i=0; i< $(this).get(0).files.length; ++i){
        var file1 = $(this).get(0).files[i].size;
        if(file1){
          var file_size = $(this).get(0).files[i].size;
          if(file_size > 2000000){
            $('#error-message').html("File upload size is larger than 2MB");
            $('#error-message').css("display","block");
            $('#error-message').css("color","red");
          }else{
            $('#error-message').css("display","none");
          }
        }
      }
    });
  });
</script>
``` 

**_[Read Also : How To Check RAM And CPU Usage In Laravel](https://techsolutionstuff.com/post/how-to-check-ram-and-cpu-usage-in-laravel)_**
 

And you will get output like this :

![How To Validate Max File Size Using Javascript](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6bko79zrk1b8fji935a6.jpg)

---

You might also like :

**_[Read Also : Basic Github And Git Commands](https://techsolutionstuff.com/post/basic-github-and-git-commands)_**

**_[Read Also : Laravel Datatable Example Tutorial](https://techsolutionstuff.com/post/laravel-datatable-example-tutorial)_**

**_[Read Also : Import Export CSV/EXCEL File In Laravel](https://techsolutionstuff.com/post/import-export-csv-excel-file-in-laravel)_**
Hacktoberfest First Pr
Tags: hacktoberfest, opensource, beginners
Published: 2021-11-01 03:23:36

The first Hacktoberfest problem that I have been involved in is helping translate the Trail-Sense project to Vietnamese.
Trail-Sense is an application for using Android phone sensors to assist with wilderness treks or survival situations.
The owner wants to translate the Setting of the app to many languages to make it more user-friendly. The issue has been discussed [here](https://github.com/kylecorry31/Trail-Sense/issues/213).
It has not taken me a lot of time to work on the issue since the owner takes advantage of the Weblate platform. The platform is easy to use, and it can track the progress of your translation. 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m42vfy6r3dkmalna01ao.png)

The project owner was helpful, and he explained what he expected and what I should do to the issue. So, in overall, I don't have a lot of difficulty working on this issue. 
I think it is a useful project, and I am happy that I can contribute a [small part](https://hosted.weblate.org/projects/trail-sense/trail-sense-android/vi/) to it.
Hacktoberfest 2021
Tags: hacktoberfest, beginners, opensource, codenewbie
Published: 2021-11-01 03:13:08

> _Hacktoberfest is a yearly event to encourage people to contribute to open source in October. It’s a celebration of community, learning and giving back—topped off by DigitalOcean thanking participants. You can read more about the festivities—and the thank yous—on the [official site](https://hacktoberfest.digitalocean.com/)._ 

![Hacktoberfest](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k23tkojdfkr93yiufxbh.png)

This was my first year participating in this event. There were some trash repositories (luckily, they don't get included).
![Add name to contributors list repos have been excluded](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4crq0onnbolapz2y5bxk.png)

But many good ones too. Hunting through those with the pressure of scoring well in mid-terms was tough for me. Because anytime I went ahead to find a repository with hacktoberfest label, there were 100s of DSA related repositories which stopped my way and I felt like I am wasting my time on those. So, on October 30, 2021 at 10PM (too late, but better late than never), I opened GitHub and thought to myself that there's at least one issue I can resolve with my current knowledge. And I found something. I went to explore section. Looked for a repo with hacktoberfest label, found issues with that label and after some looking and analysing, I made my first PR and it got merged, I felt like I am unstoppable now. :p
![Email on making first Pull request](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3uih9i0nmgrvi2pw3z8f.png)
 
On October 31, 2021, I completed and hit the 4 pull requests mark.
![Email on making 4 Pull requests](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b47usqyye26n3fpy76w2.png)
<hr>

Till now, I had only used GitHub for sharing my code and for collaborating with my college peers, I knew I can contribute to other repositories too but never knew how to but hacktoberfest really helped me find my way through. I will keep on making more contributions. Thanks Digital Ocean for conducting this event! :)
 
My next post will be resources from where I learned how to work with Git and GitHub. Check out my [_previous blog_](https://dev.to/tannudaral/git-and-github-are-the-same-21bp) for finding the difference between the two.

Thanks for reading!
GitHub Globe with Three.JS
Tags: javascript, webdev, webpack, threejs
Published: 2021-11-01 03:05:04

GitHub is where the world builds software. More than 56 million developers around the world build and work together on GitHub. With our new [homepage](https://github.com/home), we wanted to show how open source development transcends the borders we’re living in and to tell our product story through the lens of a developer’s journey.

{% youtube pHIRj0jlNTQ %}

Now that it’s live, we would love to share how we built the homepage directly from the voices of our designers and developers. In this series, we’ll discuss:

The main goals we set out to achieve in the design and development of the globe were:
* An interconnected community. We explored many different options but ultimately landed on pull requests. It turned out to be a beautiful visualization of pull requests being opened in one part of the world and closed in another.

* A showcase of real work happening now. We started by simply showing the pull requests’ arcs and spires, but quickly realized that we needed “proof of life.” The arcs could quite as easily just be design animations instead of real work. We iterated on ways to provide more detail and found most resonance with clear hover states that showed the pull request, repo, timestamp, language, and locations. Nat had the idea of making each line clickable, which really up-leveled the experience and made it much more immersive. Read more here.

* Attention to detail and performance. It was extremely important to us that the globe not only looked inspiring and beautiful but that it performed well on all devices. We went through many, many iterations of refinement, and there’s still more work to be done.

**Rendering the globe with WebGL:-**

At the most fundamental level, the globe runs in a WebGL context powered by [three.js](https://github.com/mrdoob/three.js/). We feed it data of recent pull requests that have been created and merged around the world through a JSON file. The scene is made up of five layers: a halo, a globe, the Earth’s regions, blue spikes for open pull requests, and pink arcs for merged pull requests. We don’t use any textures: we point four lights at a sphere, use about 12,000 five-sided circles to render the Earth’s regions, and draw a halo with a simple custom shader on the backside of a sphere.
5 Aspectos claves del mantenimiento de un sistema
Published: 2021-11-01 03:02:16

Este artículo fue creado para una tarea de la Universidad Francisco Gavidia utilizando como base el capítulo 9 del libro "Ingeniería de Software un enfoque práctico" de Roger Pressman.

# 1. La evolución del software 
Es de aceptar en la empresa que un software evoluciona por los cambios por ejemplo cuando se corrigen errores o se adaptan a un nuevo entorno o nuevas funcionalidades solicitadas por el cliente, Manny Lehman junto a colaboradores desarrollaron una teoría unificada de la evolución del software, que contiene leyes subyacentes como la ley del cambio continuo, ley de complejidad creciente, ley de autorregulación, ley de crecimiento continuo, etc. Estas leyes son una parte fundamental para entender el propósito de la reingeniería de software. 

# 2. RPE (Reingeniería de procesos de empresa)
Los procesos empresariales son tareas lógicamente relacionadas que tienen un cliente definido que recibe el resultado, la mayoría de RPE se enfoca en procesos o subprocesos individuales. Consta de estas actividades
![Diagrama de Procesos Empresariales](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9jhp57m0bdrq416yo9lj.png)

# 3. Reingeniería de Software
A diferencia de RPE, en la reingeniería de software se contempla un modelo de proceso de ingeniería para reconstruir partes de la aplicación existente. Esta puede contar de los siguientes procesos:
![Procesos de la reingeniería de software](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o1flnckaua3n512bynm1.png)

# 4. Ingeniería inversa 
Ingeniería inversa extra información de como funciona un programa existente esto puede suponer la reestructuración de código que supone la reestructuración de módulos sospechosos, y la reestructuración de datos que es una reestructuración a gran escala, ya que se reestructuran los modelos de datos muchas partes del código pueden cambiar, esto se muestra en el siguiente proceso:
![Proceso de Ingeniería Inversa](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/npcj6c952ujo0pfrwfr6.png)
 
 

# 5. La economía de la reingeniería
Es un análisis por medio de fórmulas para verificar si vale la pena someter a una aplicación existente a una reingeniería midiendo su costo-beneficio de manera cuantitativa, esto es de mucha importancia para determinar si vale la pena invertir en este mantenimiento del sistema. 
![Fórmulas de la economía de la reingeniería](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/exuqw9dy3l85bpwfvpac.png)
The Last Hacktober PR
Tags: opensource, javascript
Published: 2021-11-01 02:48:39


## The Project
[jira-remote-link-action](https://github.com/carlsberg/jira-remote-link-action).
From their Read Me:
“This action creates remote links in Jira from the issue keys found in GitHub Issues.”

## The Issue
[Issue #5](https://github.com/carlsberg/jira-remote-link-action/issues/5).

For this PR, my task was to throw an error if the request was unauthorized. Looked easy at first glance.

The hard part of this issue was to find it, the project has almost 6500 lines of code in a single file, plus the author didn’t gave much information on where to find it, so I had to read it and understand how it works in order to fix it.

## Documentation
This brings me a topic to the mind, the importance of documenting the code well and splitting it in many parts to make the life of the other people that will maintain your code easier.
Hacktoberfest Recap
Tags: hacktoberfest, github
Published: 2021-11-01 00:48:59

It's bizarre to think that we're already past the month of October - wrapping up what has been my first Hacktoberfest experience. I'm happy to have made a total of five contributions to four different projects:

1. **[github-readme-streak-stats ](https://github.com/DenverCoder1/github-readme-streak-stats)** 
A tool used to create Github user stats. It was my first time looking at PHP and the issue was fixing the error message generated to be of type JSON.
[Blog Post](https://dev.to/menghif/hacktoberfest-1-5721) - [Issue](https://github.com/DenverCoder1/github-readme-streak-stats/issues/141) - [PR](https://github.com/DenverCoder1/github-readme-streak-stats/pull/165)

2. **[mehrzahl](https://github.com/JoschuaSchneider/mehrzahl)**
A nice little NPM module I found that allows to format parts of a template string in singular or plural. I added a brand new functionality with the reverse function `mz` and included tests for it.
[Blog Post](https://dev.to/menghif/hacktoberfest-2-3j2j
) - [Issue](https://github.com/JoschuaSchneider/mehrzahl/issues/2) - [PR](https://github.com/JoschuaSchneider/mehrzahl/pull/3)

3. **[bedrock](https://github.com/mozilla/bedrock)**
In this contribution I managed to fix a CSS bug for the website [mozilla.org](https://www.mozilla.org/). It turned out to be a small fix but I learned a lot by exploring this repo.
[Blog Post](https://dev.to/menghif/contributing-to-mozilla-45l2) - [Issue](https://github.com/mozilla/bedrock/issues/10255) - [PR](https://github.com/mozilla/bedrock/pull/10583)

4. **[telescope](https://github.com/Seneca-CDOT/telescope)**
I made two contributions to telescope. In the first one I replaced the old and unnecessary [valid-url](https://www.npmjs.com/package/valid-url) module with the native [`URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL) function.
[Issue](https://github.com/Seneca-CDOT/telescope/issues/2147) - [PR](https://github.com/Seneca-CDOT/telescope/pull/2349)
In the second one, I created a new way to display all of the Github repos, issues and pull requests from a blog post. This was my biggest contribution so far and a good way to end Hacktoberfest!
[Blog Post](https://dev.to/menghif/adding-a-feature-to-telescope-adi) - [Issue](https://github.com/Seneca-CDOT/telescope/issues/2360) - [PR](https://github.com/Seneca-CDOT/telescope/pull/2367)

---

I've learned a lot during this month. I worked with various languages and frameworks such as PHP, Typescript, CSS and React; I ran into and found solutions to installation problems; I became a lot more comfortable using git; and finally I learned to be more confident in participating in open source projects. In all, it was a great experience and I will definitely continue contributing to more open source projects going forward.
I built a Blockchain in just 84 lines of code.
Published: 2021-11-01 02:01:27

Hello and welcome. I am [Sushant](https://instagram.com/sushant102004). In this post I am going to tell you how I build blockchain in just 84 lines of code. I am also going to share codes with you.
## Programming Language Used
I have used python to make this blockchain because Python have very simple and easy to understand syntax.
## Libraries Used
The libraries that I have used in making this blockchain are datetime, hashlib, json and flask.
* Datetime: - This library is used in order to get time when a block is created in blockchain.
* Hashlib: - It is used because blockchain works on cryptography and you have to create SHA256 hash for every block.
* JSON: - It is used because we want to present our data in JSON format.
* Flask: - To run our blockchain on a server we are using flask.

Check Out Blockchain in my [GitHub Repo](https://github.com/sushant102004/Blockchain-Python)
Let's Connect on [Instagram](https://instagram.com/sushant102004)