teleren/devto huggingface dataset:
DAW + Audio Engine Dev Update (#7)
Tags: music, audioprocessing, daw, ava
Published: 2021-03-17 14:48:46

Hello! Ava is taking a shape now. Since my last update on March 6th, I did these things:
- Fixed the delay effect. 
- Rewrote the demo
- Wrote a structured demo which has an interface that uses Ava and the user just calls the functions of that class.

I'm gonna work on these tasks until the next post:
- Creating another effect and another basic instrument (or maybe turn the SimpleSineGenerator into WaveGenerator and have it create all kinds of waves + white and pink noise)
- Changing the audio input/output devices settings.

If I find more time in the next 2-3 weeks, I'm gonna work on these tasks too:
- A real time output callback (without input streams)
- Dockerize the project (which might need a lot of time because of the project's dependencies.)

After that, I'll be able to use Ava on the DAW and also the digital hardware synth that I'm working on for my university project. The deadline for that project is cutting close so I have work on other parts of the synth in parallel. I'll write about that in detail too.

You can check out Ava from [here](https://github.com/funktional-stdo/ava). I frequently update the tasks I'm working on, on [this kanban board](https://github.com/funktional-stdo/ava/projects/1).
Por que nós mulheres temos dificuldade de nos candidatarmos às vagas de emprego?
Tags: womenintech, wecoded, career, womakerscode
Published: 2021-03-17 14:29:07

Um estudo realizado pelo LinkedIn, chamado “Gender Insights Report” (Informe de Percepção de Gênero) mostrou que embora ambos os sexos busquem empregos de maneira semelhante, eles se aplicam às vagas de forma diferente. Mulheres são 16% mais propensas a não se candidatarem a um emprego depois de lerem os pré-requisitos e se inscrevem 20% a menos que homens às vagas. O motivo?  A pesquisa revela que, a fim de se candidatar a um emprego, as mulheres sentem que precisam atender 100% dos critérios, enquanto os homens geralmente se aplicam após atingir cerca de 60%.

Isto acontece porque desde muito cedo, as meninas aprendem que devem ser educadas e controladas. São ensinadas a agradar, a ter um sorriso bonito, a tirar boas notas, a tomar cuidado para não cair e se machucar. Ao serem criadas nessa bolha de super proteção acaba minando a vontade das mulheres de se exporem a risco e fracassos. 

Pensando nessa construção social, percebe-se que isto faz com que a mulher se cobre demais e se valorize menos, às vezes até relativizando ou diminuindo conquistas, esforços e competências. Com isso, ao avaliar os requisitos para vagas de emprego, tende a calcular a probabilidade de ser aceita e quando perceber que é baixa, nem arrisca, pois é melhor desistir do que esperar e se frustrar.

Por outro lado, analisando a forma como os meninos são criados, eles são ensinados a explorar, apostar alto, se arriscar, por exemplo, subir até o topo dos brinquedos e então se jogar com tudo. E, quando se tornam adultos, ao negociar um aumento ou até mesmo chamar alguém para sair, estão acostumados a assumir riscos e sabem que serão recompensados por isso. Podemos concluir que, estamos criando meninas para serem perfeitas e meninos para serem corajosos. 

Estes são os principais motivos que dificultam ou impedem que nós mulheres nos candidatemos às vagas de emprego, mas como podemos reverter isso? 

- Tendo autocompaixão, nos tratando com a mesma gentileza e cuidado que temos com as outras pessoas. 
- Aproveitando o processo, sabendo que vamos falhar e que está tudo bem. Quando entendemos que o fracasso faz parte do processo o tornamos mais leve e conseguimos aproveitá-lo da melhor forma.
- Construindo uma rede de apoio, é muito importante estar cercada de pessoas que te mostram todos os dias o quanto você é capaz ou quem você pode procurar quando pensar em se autossabotar.
- E, por fim, entendendo que quando nos arriscamos temos mais chances de sermos recompensadas, mesmo tendo que enfrentar alguns fracassos pelo caminho.

Sugestão de TED:
https://www.youtube.com/watch?v=fC9da6eqaqg

Referência:
https://business.linkedin.com/content/dam/me/business/en-us/talent-solutions-lodestone/body/pdf/Gender-Insights-Report.pdf
The epedemic of Bootstrap by Twitter
Tags: css, webdev, html
Published: 2021-03-17 14:24:58

When I became a web developer bootstrap by twitter was the big craze! It was amazing but then TailWind CSS came to the block, It can create much better css and produce mouth watering websites. Bootstrap is good, but tailwind CSS punched it in the stomach and It never recoverd sadly... Plain css is OK but not Amazing, it was twitter trying to get web developers on their new CSS libary, It worked good! but like everything it faded away, like angular when React came on the block and like TailWind CSS, puched it in the stomach and angular never recoverd, Bootstrap studio is amazing! but very overpriced. For what you get, just saving you a da ot two, its not worth it sadly. Twitter tried amazingly but sadly did not try enough

James Harris
High School student
Email me: James@adaptos.co.uk
AI+ Careers Lab & Expo Hosted at ODSC East 2021
Tags: datascience, career, ai, odsceast
Published: 2021-03-17 14:23:53

Join Ai+ Career Lab & Expo at ODSC East for FREE.
Meet with recruiters from 15+ companies & hear from industry experts on upgrading your resume, transitioning into the field, landing your next job & more!

It’s FREE TO ATTEND!
Sign up https://bit.ly/3jvEcLb Offer expires this Friday 

Whether you are trying to kick-start or accelerate your data science career, AI+ Career Lab & Expo 2021 is the place to be.

About this Event

15+ hiring partners will be seeking talented individuals to fill their open data science positions - reach out to them virtually - no matter where you are in the world.

Book your free ticket today and:

learn about the open positions each employer is looking to fill
apply with your resume right away
get actionable advice from expert mentors about the best path to a career in AI
have a 1:1 session with a recruiter
land your dream job with one click!
AI+ Careers Lab & Expo 2021 is ideal for job seekers from both the tech and business fields. Consider attending if you're a developer, marketer, data scientist, software engineer, data engineer, data analyst, business analyst, product manager or in another related field.

Don't miss the chance to engage with top employers in the data science field and open up amazing career opportunities from the comfort of your place.

* This pass gives you access to the Virtual AI Career Expo ONLY. https://odsc.com/boston/hiring/

If you are an employer that is interested in hiring, please email your inquiries to hiring@odsc.com.

Please submit your resume here if you are interested in being contacted by any of our hiring partners to set up interviews prior to the Career Expo.

Register at: https://bit.ly/3jvEcLb
How do you receive error alerts?
Tags: discuss, python
Published: 2021-03-17 14:18:10

I've set up a cron job that runs a python script throughout the day on a machine I don't closely monitor. If the python script fails I'd like to receive a notification to my personal device so I can address the situation.

What would you or have you used in this situation?

Email? SMS? Something else?

Looking for a simple solution. Ideally, I'd prefer not to set up a new email for this use case.
discord.py Project 2: Welcomer 👋🏽
Tags: discord, discordpy, python
Published: 2021-03-17 14:12:37

In this article, you're going to learn how to make a welcoming bot!

It will send a welcome message to a specified channel with the user's avatar and name!
![](https://mikey.has-no-bra.in/FXbFgY.png)

---
To start, we need to initialize our bot. For this walkthrough, we can use discord.Client instead of commands.Bot, because we aren't going to have any commands.

```py
import discord

client = discord.Client()
```

We next need to add our `on_member_join` event, and tell the bot to send an embed in the channel:
```py
import discord

client = discord.Client()

@client.event
async def on_message_join(member):
    channel = client.get_channel(channel_id)
    embed=discord.Embed(title=f"Welcome {member.name}", description=f"Thanks for joining {member.guild.name}!") # F-Strings!
    embed.set_thumbnail(url=member.avatar_url) # Set the embed's thumbnail to the member's avatar image!

    await channel.send(embed=embed)
```

---
Now run the code, grab an alt account or ask a friend to join the server, and boom!

*But wait... It doesn't work!*
That's because we need the members intent enabled!

After you've [enabled the Privileged Intents in the dashboard](https://discordpy.readthedocs.io/en/latest/intents.html#privileged-intents), we need to enable them in the code!

```py
import discord

intents = discord.Intents.default()
intents.members=True
client = discord.Client(intents=intents)

@client.event
async def on_message_join(member):
    channel = client.get_channel(channel_id)
    embed=discord.Embed(title=f"Welcome {member.name}", description=f"Thanks for joining {member.guild.name}!") # F-Strings!
    embed.set_thumbnail(url=member.avatar_url) # Set the embed's thumbnail to the member's avatar image!
    await channel.send(embed=embed)
```

What you've just done is told the `discord.Client` to ask for the Members intent when it starts up. Now it will be able to see member events.

Now run the code to see the bot welcome the user!

---
#### Have Questions? Have a suggestion about what to do for the next post?
Tell me in the comments and I'll reply as soon as possible!



##### If you found this useful, make sure to like the post and share it with a friend! You can also follow me to get my content in your feed as soon as it's released!
How To Build A Better Spotify With React

Tags: react, ai, machinelearning, webdev
Published: 2021-03-17 14:06:17

Spotify is pretty cool, but what if you could make a better version? In this video I show you how to create a Spotify clone that not only has many of Spotify's features but also includes lyric lookup for any song you want.

{% youtube Xcet6msf3eE %}
How to deploy a React App to Vercel host for free
Tags: react, deploy, deployment, vercel
Published: 2021-03-17 13:48:14

[Vercel](https://vercel.com/) combines the best developer experience with an obsessive focus on end-user performance, which enables frontend teams to do their best work.

This post outlines how to deploy React App to *Vercel* host **for free**. You might be interested in other free deployment options:

- [How to deploy a React App to Firebase host for free](https://dev.to/davidkou/how-to-deploy-a-react-app-to-firebase-host-for-free-401p)
- [How to deploy a React App to Cloudflare host for free](https://dev.to/davidkou/how-to-deploy-a-react-app-to-cloudflare-host-for-free-358i)

<hr>

 # Deploy React Apps on Vercel

- Demo Site: https://xyz-vercel.vercel.app/
- Github repo [here](https://github.com/DavidKou/ReactDeploymentOnCloud/tree/master/vercel)
                     

## Create react app

```
npx create-next-app project-name
cd project-name

yarn
yarn dev
```

## Install Vercel tools CLI

The Vercel command-line interface enables instant cloud deployment and local development.

```Javascript
npm i -g vercel
```
<hr/>

## Login Vercel using CLI

```
vercel login
```

You will be prompted to enter an email, where a link will redirect you to a verification page. Click the `VERIFY` button to proceed.

![](https://github.com/DavidKou/ReactDeploymentOnCloud/blob/master/vercel/snapshots/login2.png?raw=true)

After this, you will see below result in CLI:
![](https://github.com/DavidKou/ReactDeploymentOnCloud/blob/master/vercel/snapshots/login1.png?raw=true)



<hr/>

## Setup Vercel project from CLI

Note: you can also create a project using Vercel console, but using CLI is more convenient.

1. Run the below command
```
cd project-name
vercel 
```

You need cd into the folder where React App is created. Follow the instructions as shown below:

![](https://github.com/DavidKou/ReactDeploymentOnCloud/blob/master/vercel/snapshots/init.png?raw=true)


2. Confirm YES.
3. Create a new Vercel project, by typing "y".  
4. Input a project ID, e.g. "xyz-vercel", choose a directory where the code resides.
5. Overwrite the default settings if needed.
6. You might wish to override the build command if necessary 

After a few seconds, your app will be deployed to Vercel and a URL will be given: e.g. https://xyz-vercel.vercel.app/
<hr/>


Open a browser window, and type the url: https://xyz-vercel.vercel.app/

![](https://github.com/DavidKou/ReactDeploymentOnCloud/blob/master/vercel/snapshots/result.png?raw=true)

Now, your app is deployed to Vercel! Happy coding, happy deploying!
Juste un petit conseil d'UI
Tags: showdev, javascript, french, webdev
Published: 2021-03-17 13:45:14

---
title: Juste un petit conseil d'UI
published: true
description: 
tags: showdev, javascript, french, webdev
//cover_image: https://direct_url_to_image.jpg
---

Evitez de faire ça : 
{% codepen https://codepen.io/JeremyMonatte/pen/VwmNygd %}

Askip c'est pas ouf 😉.
Just a little UI tips
Tags: showdev, javascript, css, webdev
Published: 2021-03-17 13:44:34

---
title: Just a little UI tips
published: true
description: 
tags: showdev, javascript, css, webdev
//cover_image: https://direct_url_to_image.jpg
---

Don't do that : 
{% codepen https://codepen.io/JeremyMonatte/pen/VwmNygd %}

That's the best tips I can give 😉.
VS Code Extensions for Python
Published: 2021-03-17 13:12:56

Visual Studio Code is a streamlined code editor with support for development operations like debugging, task running, and version control. 👨‍💻

Here are few best VScode extensions for Python Developer.⚡

1. Better Comments
This extension is great for developers working with multiple languages, as its list of supported programming languages seems endless. We really like it for Python developers who tend to get into code binges and forget to comment code as they go along. Better Comments makes it really simple to go back and comment code; the extension supports categorization of comments as well as unique styling.

2. Python Indent
VSCode works with a ton of languages… but doesn’t seem to be proficient in any. This is why extensions are important—and why even the simplest extensions, such as Python Indent, are important.

3. Python Docstring Generator
Docstrings are core to Python development, serving as mini documentation for any module, method, class, or function. Python Docstring Generator makes it really easy to document your code in VSCode and follows all standard formats.

4. Python Preview
This extension is really simple but extremely handy. It brings a visual view to VSCode for Python, which makes debugging code far simpler and likely quite a bit faster. It helps you visualize your code and ensure what you’ve imagined is exactly what’s represented.

5. Task Explorer
Whereas Python Preview is meant for simpler codebases and those learning to code, Task Explorer turns your VSCode experience all the way up. This extension allows you to visualize just about every function and action of your codebase without ever leaving VSCode.
Allahın belası Redux.
Published: 2021-03-17 12:47:52

Bu Redux kadar aptalca bir state manager olamaz. Ekranda iki değer değiştireceksiniz diye bin satır kod yazdırır. Dosyadan dosyaya atlatır; adeta ipe un dizdirir.
Bu kadar acıya ne gerek var?
Alt tarafı bir proje yapacakken bu kadar zahmete katlanıp, onca zaman harcamaya değer mi!?

Fakat kılıfını uydurmuşlar; fonksiyonel paradigma!! Manevraya bak!!
Dürüstçe söylesene, biz fantazi yapıyoruz, ciddi düşünenler kullanmasın desene! Efendice, çekip gitsene!!!

Yıllarca uyuttular geliştiricileri, sen bilmiyorsun bunu o yüzden yapamıyorsun diye sayfalarca dokümanlar okuttular; hep aynı bahanenin arkasına saklandılar, "her şeyi kütüphaneden beklemeyin" dediler. Hayır efendim, herkes, her şeyi kütüphaneden bekleyecek! Sen geliştiricilerin yüklediği kütüphanesin; adın üstünde, kütüphane!! Kod sende, cpu sende, ram sende! Sen elindeki bu yetki ve güçle bir işe yarayamıyorsan, state'i düzenleyici olamıyorsan, dört tane değişkeni yönetmek için kırk dereden su getirtiyorsan, bunun bir izahı olabilir mi?

React'ta state yönetmek için paradigma mı gerekiyor? Veri mi gerekiyor? Bilgi mi gerekiyor, fonksiyon mu gerekiyor? Var... Hepsi var... Yenilerini aramayın... Doğru amaçlar belirleyin, doğru yöntemler geliştirin yeter...

Yanlış biliyorlar. Hiç bilmeseler daha iyi, ama yanlış biliyorlar ve sizi de projelerinizle birlikte bu yanlışlara sürüklüyorlar.

Biz, bu acı ve zahmeti dindirecek bir state manager yazdık ve açık kaynak olarak yayınladık.

https://github.com/storkenjs/storken

Bundan sonra kim hangi state managerı kullanıyorsa kullansın.
Bizimki ya da başkalarınınki. Acısız kod yazmak sizin hakkınız. Hakkınızı isteyin ve alın!!!
Rename column in laravel migration
Published: 2021-03-17 13:01:35

php artisan make:migration rename_fields_to_chat_messages_table --table=chat_message
You can created migration file with above command.
You can rename column as follow.

    public function up()
    {
        Schema::table('chat_message', function (Blueprint $table) {
            $table->renameColumn('created_date', 'created_at');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('chat_message', function (Blueprint $table) {
            $table->renameColumn('created_at', 'created_date');
        });
    }
you can update as follow

  public function up()
    {
        Schema::table('chat_message', function (Blueprint $table) {
            $table->unsignedInteger('user_id')->change();
            $table->unsignedInteger('doc_id')->change();
            $table->unsignedInteger('created_by')->nullable();
            $table->unsignedInteger('updated_by')->nullable()->after('created_by');
            $table->timestamp('created_at')->nullable()->change();
            $table->timestamp('updated_at')->nullable()->after('created_at');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('chat_message', function (Blueprint $table) {
            $table->dateTime('created_date')->change();
            $table->dropColumn('created_by');
            $table->dropColumn('updated_by');
            $table->dropColumn('updated_at');
        });
    }
CS50 Week 6 - Cash in Python (Less Comfortable)
Tags: python, cs50, cash
Published: 2021-03-17 12:58:27

### The Problem
The user will input some amount of change and we have to take away the largest posssible coin (¢1, ¢5, ¢10, ¢25) until there is no change left and return how many coins it took to reach 0.

### The Solution
Firstly we're going to need the get_float function from cs50.
```
from cs50 import get_float
```
Next, we need to make sure the number being input by the user is valid which we will need a variable for. We also need a variable to track how many coins have been used so I decided to declare these first
```
# Declare variables
change = 0
count = 0
```
To make sure the input is valid, I used a while loop to check if **change** is greater than 0. If not, simply re-assign the variable with another prompt. After the input I rounded the value and multiplied by 100.
This makes sure that the input is always possible to work with. If it was 0.00001 for example, multiplying this by 100 would give you 0.001 which is not a possible coin. Rounding it would round to 0 in this case.

```
# While change is NAN, prompt user
while change <= 0:
    change = get_float("Change owed: ")
    cents = round(change * 100)
```
Looking back I probably could've put the `cents = round(change * 100)` after the while loop because it's just making the computer do unnecessary work. Oh well ¯\_(ツ)_/¯

All we need to do now is check if cents is greater than the coin values, if it is, take away the value from **cents** and increment the count.
```
while cents > 0:
    if cents >= 25:
        cents = cents - 25
        count = count + 1
    elif cents >= 10:
        cents = cents - 10
        count = count + 1
    elif cents >= 5:
        cents = cents - 5
        count = count + 1
    elif cents >= 1:
        cents = cents - 1
        count = count + 1
```
I'm 99% sure the order is important here. We want to check if the largest coin is possible **FIRST** before checking the others.

Once this is done we can simply print the number of coins!
```
print(count)
``` 

Full code:
```
from cs50 import get_float

# Declare variables
change = 0
count = 0

# While change is NAN, prompt user
while change <= 0:
    change = get_float("Change owed: ")
    cents = round(change * 100)

# While cents is greater than 0, take away largest coin possible  and increment count
while cents > 0:
    if cents >= 25:
        cents = cents - 25
        count = count + 1
    elif cents >= 10:
        cents = cents - 10
        count = count + 1
    elif cents >= 5:
        cents = cents - 5
        count = count + 1
    elif cents >= 1:
        cents = cents - 1
        count = count + 1

print(count)
```
"We didn't write tests because we wanted to get our code out faster"
Tags: testing, testdev, beginners, codequality
Published: 2021-03-17 12:58:04

"We didn't write tests because we wanted to get our code out faster."

Those words were uttered by a coworker during a handoff call in which my team would be assuming ownership of a code repo from their team. I cringed.

Not writing tests leaves you open to bugs, makes refactoring more difficult, and actually makes you move slower in the long run.

That's it. That's the post. We can end this article here if you want.

*(For confidentiality purposes, we won't go into where this happened or how long ago this happened.)*

---

Digging in a little deeper, let's look at why those three assertions are true.

---

## Not writing tests leaves you open to bugs

This point should be self-evident. If you have no automated tests ensuring your code is working properly, then you're relying on manual testing to verify your app's behavior. Manual testing is tedious, and as your app grows, it becomes unwieldy for one person to be able to retain a mental model of the entire app's architecture and understand how any given change in one part of the app will affect other parts of the app 100% of the time.

Untested code is buggy code. Even if the code is bug-free for now, it won't remain that way for long.

---

## Not writing tests makes refactoring more difficult

Tests provide the support you need during refactoring to ensure that the app still works correctly after your changes. Without tests in place, you really can't be confident that your refactors are safe. You're back to the responsibility of thoroughly manually testing the entire app to ensure no regressions have occurred. Wouldn't it be nicer to have automated tests do this work for you?

---

## Not writing tests makes you move slower in the long run

The larger your app becomes, the more surface area there is for bugs to hide, and the more time you must spend manually validating your changes. During manual testing it's inevitable that things will be missed. Bugs will be released into production, and your team will spend their days fighting fires and fixing bugs rather than working on exciting new features.

---

## There is a better way

If the scenario I've described doesn't sound appealing to you, good! Luckily, there is a better way. Write tests for your code –– always. And if your repo doesn't currently have tests, take steps to fix that now. Ensure that every new merge request includes tests, and slowly but surely increase your repo's test coverage as you go. You'll be glad you did.