teleren/devto huggingface dataset:
Learn FastAPI With Me (Part 1)
Tags: python, api, webdev, beginners
Published: 2021-06-22 12:35:56

Hey there, Today I'm going to start this series of "Learn FastAPI With Me". So those how don't know what a api is, let me tell you:

According to Wikipedia:

An application programming interface(api) is a connection between computers or between computer programs. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how to build such a connection or interface is called an API specification.

But if you are just starting and don't care about definition and want things in simple and clear words,

An API is just a program that helps two programs to talk to each other. Imagine an API as the mouth and ears of a program, using which the program can talk and listen to other programs.

Want an API in your web app now?
Fine, Normally APIs are made using javascript, but it takes time to make one.
So let's take the easy path insted and use our beloved programming language that we all know, Python.

We will use FastAPI for now
You can use other API frameworks too (like flask), but we are using FastAPI for now

### Why FastAPI?
* It's Fast
* It easy 
* Supports async functions

And that should be it to convince you

Not convinced yet?
* It supports rendering of html pages
* File transfers

Let's continue now,

### Installation:

It's very easy to install FastAPI just type this(↓) in your terminal 
```$ pip install fastapi```

If you don't get an error, you're solid let's create out first api
 
### The API:

Now let's create our first api
Create a file `main.py` in any folder
Copy-Paste the code given below in the `main.py` file
```
from fastapi import FastAPI
app = FastAPI()
@app.get('/')
def home():
    return {'data':'Get This And Be Happy'}
```
And done, your first basic API is ready!
but, how do you test if this is working?
we use a server to check if it is working.

### The Server
We will be using `uvicorn` to test our api
Let's install it!
`$ pip install uvicorn`
now open a terminal and go to the folder where `main.py` is and type the following
`uvicorn main:app --reload`
And hit enter
A URL will be provided to you in the terminal, Go to that URL
(It will mostly be http://127.0.0.1:8000)
If you see `{'data':'Get This And Be Happy'}`, Then do what you see, be happy, your api is working!! 

In the next post I will explain what that code is, until then be happy

See you in the next post.
Laravel Where Clause with Mysql Function Example

Published: 2021-06-22 12:24:51

When you are working on laravel projects and you need to use mysql function in where clause then you can easily use that using DB::raw() and whereRaw(). In this example you can show how to i use mysql function in where clause. In this example i want to compare with year of created_at field but not whole date, that's whay i use mysql function Year(), this function will return only year from timestamp and compare with given value.
Example 1:

$data = DB::table("items")->select("items.*")
	     	->where(DB::raw("Year(items.created_at)"),'2016')
	     	->orderBy('items.created_at')
	     	->get();
Example 2:

$data = DB::table("items")->select("items.*")
	     	->whereRaw(DB::raw("Year(items.created_at) = '2016'"))
	     	->orderBy('items.created_at')
	     	->get();
1 week later of ML modelling...
Tags: modelling, machinelearning, ai
Published: 2021-06-22 12:23:52

1 week later. 168h uninterrupted on intel I7 with 16Gb of Ram. here it is the result in just one excel chart

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5u8c4uiqugans4hsacel.png)
how to make bold matched text in autocomplete jquery
Published: 2021-06-22 12:22:55

Hello Everyone!
I am new here, this is my first post, I need your help, I am using Autocomplete-Jquery. I need to bold text in dropdown list of autocomplete suggestions. How I can do ? Please help me in this regard. thanks.



I need your help, I am using Autocomplete-Jquery. I need to bold text in dropdown list of autocomplete suggestions. How I can do ? Please help me in this regard. thanks.

this is my code:

   $(function () {
        $("#age").autocomplete({
            source: '{% url 'autocomplete' %}',
            appendTo: "#appendToHere",
            select: function(event, ui) {
                selectedItem = ui.item.value;
                document.getElementById("age").value = 
                selectedItem;

                $("#searchBtn").click();
            },
        });
    });
Developer Research Project - Participate in Virtual Interview
Tags: javascript, webdev, career, html
Published: 2021-06-22 12:01:05

HubSpot's marketing team would like to interview professional web developers to gather information about their skillset, career path, and any educational resources they use. Participants will be compensated for for time.

What does participation look like?

If you are selected to participate, one of our researchers will schedule an hour long call. During this time you will be asked a number of questions about your background and experience as a developer. Your name and answers will only be used internally within HubSpot.

Who are we looking for?

- Full-time professional web developers
- Front-end, back-end, or full-stack experience
- Developers who work for a single employer, an agency, or are self-employed
- Must be comfortable answering questions in depth via a call

How to Participate:
Complete the following form and we will reach out if you are a good fit for this project: https://forms.gle/ZsN46KjyrxTVQZBb7
Thank you for your time!
Daily Developer Jokes - Tuesday, Jun 22, 2021
Tags: jokes, dailydeveloperjokes
Published: 2021-06-22 12:00:01

---
title: "Daily Developer Jokes - Tuesday, Jun 22, 2021"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
cover_image: "https://private.xtrp.io/projects/DailyDeveloperJokes/thumbnail_generator/?date=Tuesday%2C%20Jun%2022%2C%202021"
published: true
tags: #jokes, #dailydeveloperjokes
---

Generated by Daily Developer Jokes, a project by [Fred Adams](https://xtrp.io/) ([@xtrp](https://dev.to/xtrp) on DEV)

___Read about Daily Developer Jokes on [this blog post](https://xtrp.io/blog/2020/01/12/daily-jokes-bot-release/), and check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/).___
### Today's Joke is...
![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e1258ab6087f.png)

---
*Have a joke idea for a future post? Email ___[xtrp@xtrp.io](mailto:xtrp@xtrp.io)___ with your suggestions!*

*This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit.*

<!-- 
Joke text:
___Q:___ Where did the parallel function wash its hands?

___A:___ Async
 -->
Devtron: A business opportunity in developers’ needs
Tags: kubernetes, startup, devops, cloud
Published: 2021-06-22 11:53:26

Devtron is one of the few Indian Companies that is providing advanced Open Source tools using Kubernetes. 
<bw>
One of our co-founder, Rajesh, talks about all things Kubernetes, DevOps, and Devtron in a chat with Srinath Srinivasan. Featured in Financial Express!

###**Read the full article here: [Devtron: A business opportunity in developers’](https://www.financialexpress.com/industry/sme/devtron-a-business-opportunity-in-developers-needs/2274094/)**


<bw>
<bw>
Checkout Devtron's OSS here: 
{% github devtron-labs/devtron %}
Why Vim Is The Best Editor...?
Tags: vim, neovim
Published: 2021-04-13 16:44:02

![Vim picture](https://miro.medium.com/max/678/1*_BWVJB2JzuuzyxGxm6XWQQ.png)

First, by no means I am a vim expert. In fact, I have only start using from March 2020 so basically beginner.
Before I go through the journey I must answer some basic questions about vim, those don't know about it, feel free to skip ahead.

### What is vim?

'Vim is a highly configurable text editor built to make creating and changing any kind of text very efficient. It is included as "vi" with most UNIX systems and with Apple OS X.'— I took this line from official website of vim [link](https://vim.org).

### Why use vim, when there are other text editors?
For me an aspect that standout most is **efficiency**.
<br>
At the core vim belief that people spend more time editing **existing** text than **writing** new text. This is especially true for software engineers or coders who are often tasked with enhancing and maintaining existing code. Even if you’re not a software engineer, think back to when you were writing essays in college — yes, it probably took you a long time to reach the finished product but that’s because you revised it along the way and proofread it 100 times after finishing your initial draft.
<br>
Now lets mathematical calculate how fast is vim compare to other editor like vscode, atom and sublime.
Your desktop or laptop take input and provide you with wonderful output, now let focus on input part, for input you mostly use keyboard and mouse. And you have two hand five fingers each so normal you can input using your ten fingers through keyboard, so bandwidth is ten. If you are using mouse then bandwidth four,  with delay of moving your one hand toward mouse and back to keyboard vice versa.
So when you are using other text editor you are losing time with use of both mouse and keyboard.
But in vim your hands will be sticking to your keyboard, so when you are coding you are getting bandwidth of ten consistently.
Do you agree with intrusive time tracking software?
Tags: career, remote, discuss, healthydebate
Published: 2021-06-22 11:25:24

---
title: Do you agree with intrusive time tracking software?
published: true
description: 
tags: career, remote, discuss, healthydebate
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l470lmd92mnf248dvk9l.png
---

I've started my developer career as a remote worker in a remote-only company, I thought it was great and that in this way I would have had a generally happier life (more free time, flexible time schedule and so on).

I was wrong.

I understand the usage of time tracking apps, but I guess there is a limit.

Our current software (HubStaff) is set to track EVERYTHING on my PC. I don't know if this is the industry standard for small companies (less than 10 employees), but having my desktop screenshot every x minute, all my browser activity logged and having a statistic for combined mouse/keyboard usage (with mail alerts when the daily avarage is under 50%) kinda feels like is too much and makes me feel anxious.

Should I just get used to this or it's actually an extreme case?
Social Media Presence is Cost-Effective - eGoodMedia
Published: 2021-06-22 11:24:05

Gone are the days when companies used to spend lots of money on business promotion. Though social media marketing is not completely free, you can do a lot of free stuff to market your products or services on social media. Social media marketing is divided into 2 forms- Social Media Ads & Social Media Posts. If you want to target instant purchase of your target products & services, you go for social media ads. 

Creating ads often charge you a certain amount. However, if you’re not interested in ads you can also create social media posts linking to the purchase page on your website. This way you can simply increase social media presence for your online business!

<b>Read More:</b><a href="https://www.egoodmedia.com/8-tips-to-improve-social-media-presence-of-your-business-in-2021/">8 Tips To Improve Social Media Presence Of Your Business In 2021</a>

<b>Read More Articles:</b>
<a href="https://www.egoodmedia.com/how-to-prevent-traffic-drop-seo-mistakes-after-website-redesign/">How To Prevent Traffic Drop (SEO Mistakes) After Website Redesign?</a>
<a href="https://www.egoodmedia.com/9-ways-to-improve-website-ranking-on-mobile-devices-in-2021/">9 Ways To Improve Website Ranking On Mobile Devices In 2021</a>


<b>Contact Details:</b>
422 Richards St Unit 170, Vancouver, BC V6B 2Z4, Canada
+16046704333


<b>Visit Reference Profile Websites:</b>
<a href="https://bit.ly/3zHmDQ1">https://bit.ly/3zHmDQ1</a>
<a href="https://bit.ly/2ST53b2">https://bit.ly/2ST53b2</a>
<a href="https://bit.ly/2UsDzJO">https://bit.ly/2UsDzJO</a>
<a href="https://www.egoodmedia.com/">Seattle Web Design Agency</a>
<a href="https://bit.ly/3qhvrHJ">https://bit.ly/3qhvrHJ</a>
<a href="https://bit.ly/3d4geV9">https://bit.ly/3d4geV9</a>
<a href="https://bit.ly/2UrYWuP">https://bit.ly/2UrYWuP</a>
<a href="https://bit.ly/3gQQhcV">https://bit.ly/3gQQhcV</a>
<a href="https://bit.ly/2SUJoz5">https://bit.ly/2SUJoz5</a>
<a href="https://www.egoodmedia.com/how-to-use-instagram-stories-for-social-media-marketing-campaign/">instagram stories</a>
<a href="https://bit.ly/3gWT18m">https://bit.ly/3gWT18m</a>
<a href="https://bit.ly/35IiIEF">https://bit.ly/35IiIEF</a>
<a href="https://bit.ly/3qtkB1L">https://bit.ly/3qtkB1L</a>
<a href="https://bit.ly/3j921Ki">https://bit.ly/3j921Ki</a>
<a href="https://bit.ly/3wJhGUK">https://bit.ly/3wJhGUK</a>
<a href="https://bit.ly/35Kpav0">https://bit.ly/35Kpav0</a>
<a href="https://bit.ly/3dkDKO3">https://bit.ly/3dkDKO3</a>
<a href="https://bit.ly/3wJhGUK">https://bit.ly/3wJhGUK</a>
<a href="https://bit.ly/3dkDKO3">https://bit.ly/3dkDKO3</a>
<a href="https://bit.ly/3vHAum9">https://bit.ly/3vHAum9</a>
<a href="https://bit.ly/3wP5l1d">https://bit.ly/3wP5l1d</a>
<a href="https://bit.ly/3wP5l1d">https://bit.ly/3wP5l1d</a>
<a href="https://bit.ly/3vNSKdm">https://bit.ly/3vNSKdm</a>
<a href="https://bit.ly/3gKihQs">https://bit.ly/3gKihQs</a>
<a href="https://bit.ly/2Sh67Fh">https://bit.ly/2Sh67Fh</a>
<a href="https://www.egoodmedia.com/how-to-setup-an-effective-facebook-business-page/">facebook business page</a>
How to deploy a MERN Stack App to Heroku | React + Node.js | TODO App
Tags: react, node, webdev, javascript
Published: 2021-06-22 10:59:32

Hello guys, In this video we gonna learn how to deploy mern(mongodb, express, react, node.js) app to heroku. 

{% youtube I2YkUz-S41o %}

Build todo app by watching this video = https://www.youtube.com/watch?v=NqsispG1Bv4

[source code of todo app](https://github.com/sk-Jahangeer/todo-mern-app)

**Please subscribe and support my channel.**

**Thank You**
Introduce myself
Tags: javascript, devjournal, vue, codenewbie
Published: 2021-06-22 10:34:43

### Hi, 
my name is Raquel Santos, also known as **RS-coding**.
I have a bachelor's degree in Visual Design and have worked for many years in the field, but as I took a specialization course in front-end web development in 2016-2017, at the end of 2018 I decided to quit my previous job, moving to Amsterdam-The Netherlands with my boyfriend to find new opportunities and started studying code in my spare time while working at clothing stores to have money to pay the bills.  
   
In 2020 I decided that my free time was not enough to learn, so I gave up working in stores and just dedicate myself to focus and  studying fulltime reviewing some things about HTML and CSS I already knew, learning javaScript, and  the new frameworks on the market.  
  
I resolved to write my journey as developer by telling you what I have been doing, my struggles, my accomplishments, and things that I find important to help me find the job of my dreams.
OnDelete(Cascade) not working
Tags: laravel, php
Published: 2021-06-22 10:34:16

Hello, whenever i tried deleting a record, the parent get deleted, but the children don't. Please help me out. Here are my migrations:


// FOR ACCOUNTS which is the same as Users

    public function up()
    {
        Schema::create('accounts', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('fname', 200);
            $table->string('lname', 200);
            $table->string('gender', 10)->nullable();
            $table->string('dob', 100)->nullable()
            $table->timestamps();
            
        });


//FOR LOANS

    public function up()
    {
        Schema::create('loans', function (Blueprint $table) {
            $table->id();
            $table->mediumText('project_location');
            $table->string('business_VAT', 100);
            $table->integer('account_id')->unsigned();
            $table->timestamps();

            $table->foreign('account_id')->references('id')->on('accounts')->onDelete('cascade');
        });
    }



// For purpose loans 

    public function up()
    {
        Schema::create('purpose_loans', function (Blueprint $table) {
            $table->id();
            $table->mediumText('loan_purpose');
            $table->string('loan_type', 200);
            $table->bigInteger('loan_id')->unsigned();
            $table->timestamps();
            
            $table->foreign('loan_id')->references('id')->on('loans')->onDelete('cascade');
        });
    } 


// For Status Loan

    public function up()
    {
        Schema::create('status_loans', function (Blueprint $table) 
        {
            $table->id();
            $table->string('status', 100)->nullable()->default('processing');
            $table->bigInteger('amount_recommended')->nullable()->default(0);
            $table->bigInteger('loan_id')->unsigned();
            $table->timestamps();

            $table->foreign('loan_id')->references('id')->on('loans')->onDelete('cascade');
        });
    }
7 Web Development/Programming YouTube Channels
Tags: webdev, codenewbie, beginners, programming
Published: 2021-06-22 10:27:45

_If you found value in this thread you will most likely enjoy my tweets too so make sure you follow me on [Twitter](https://twitter.com/VladPasca5)  for more information about web development and how to improve as a developer. This article was first published on my [Blog](https://vladpasca.hashnode.dev/)_

### 1. @adrian_twarog 

His videos are about Web Design, Web Development, tips, tricks, and some fun challenges.

🔗https://www.youtube.com/c/AdrianTwarog/videos

### 2. @traversymedia 

On this channel, you can learn everything you want about Web Development for free. 

Brad also shares some amazing advice from time to time.

🔗https://www.youtube.com/c/TraversyMedia/videos

### 3. @florinpop1705 

From here you can learn JavaScript, CSS, ReactJS, and Web Development from some amazing playlists full of challenges.

🔗https://www.youtube.com/c/FlorinPop/videos

### 4. @DevSimplified 

As the title says, this channel will make Web development easier for you.

I'm 100% sure that you can find a video about every web-related topic on this channel.

🔗https://www.youtube.com/c/WebDevSimplified/videos

### 5. @TechWithTimm 

On this channel, you will find videos mainly on Python and JavaScript.

It aims to give you free resources so that you can learn to code.

🔗https://www.youtube.com/c/TechWithTim/videos

### 6. @developedbyed 

On this channel you'll find videos on web development, web design, Figma, and other great advice Ed wants to share.

Oh, and don't forget about those really funny videos!

🔗https://www.youtube.com/c/DevEd/videos

### 7. @clemmihai 

On this channel, you'll find some amazing programming-related videos about soft skills, motivation, coding interviews, and web development.

🔗https://www.youtube.com/channel/UCaO6VoaYJv4kS-TQO_M-N_g/videos

### TL;DR

1. Adrian Twarog
2. Traversy Media
3. Florin Pop
4. Web Dev Simplified
5. Tech With Tim
6. Dev Ed
7. Clement Mihailescu

### The end

_I hope found this useful and if you did please let me know. If you have any question feel free to DM me on  [Twitter](https://twitter.com/VladPasca5) ._
Filling the gap between doctors and organizations with a mobile app using React
Tags: react, mobile, ios, android
Published: 2021-06-22 10:01:36


Challenges

Our client struggled with the cluttered and manual process of matching and hiring candidates. Also, being a renowned brand in the dynamic healthcare recruitment sector, they faced challenges in directly connecting with healthcare professionals looking for jobs while eliminating the need for middlemen and increasing revenue. Overall, they needed an end-to-end application that stores candidates’ data, helps candidates search for jobs, apply for jobs, schedule interviews and more without making several phone calls and emails. https://www.softwebsolutions.com/healthcare-mobile-app-using-react-native.html

**Solutions**

Softweb Solutions had a detailed discussion with the client to understand their requirements comprehensively. Our mobile app developer team created a cutting-edge [mobile application using React Native] (https://www.softwebsolutions.com/react-native-app-development-services.html) for iOS and Android platforms This customized mobile app facilitates healthcare professionals and healthcare offices to connect online with each other directly without the need for recruiters and middlemen.

**The key highlights of this mobile app are**

* Smart filtering system – Job seekers/recruiters can search by location, pay, profile, preferred time, specialty, etc
* Profile management – Candidates can create a detailed profile and save all their information for future opportunities.
* Advanced job search – Users can search for suitable opportunities and apply to matching positions in a few clicks.
* Post jobs – Healthcare recruiters can post genuine jobs in hospitals or other healthcare organizations.
* Credentialing documents – Verifying certificates and medical licenses of candidates to ensure that they are current and valid.
What are your top things you love ❤️ & hate 💔 about the npm ecosystem?
Tags: webdev, npm, node, javascript
Published: 2021-06-22 09:41:26

Node Package Manager (npm) helps us a lot in terms of performance when building new awesome applications - so many packages available and ready to be used. But over time there are also a lot of things you wished could have been better...

## So, what are the things you love, hate, miss, wished could be better when using the npm ecosystem?

Write down your top thing!