teleren/devto huggingface dataset:
How to Build real-time OpenCV barcode reader or scanner using python
Tags: python, pythonslearning, programming
Published: 2021-04-11 10:32:19

Note that : Main coding are available on <a href="https://pythonslearning.com/2021/04/how-to-build-real-time-opencv-barcode-reader-or-scanner-using-python.html">Build real time scanner using python</a>
● Store the barcode data & type in variables
● Store the bounding box locations in variables
● Draw the bounding box on the frame, with desired coordinates, color and thickness.
● Put text (barcode data & type) on the output frame
● Write every uniquely found barcode information to the log file & also print it. Finally add this barcode data to the set.
Resources : https://pythonslearning.com/2021/04/how-to-build-real-time-opencv-barcode-reader-or-scanner-using-python.html
Expert level Angular Interview Questions Part 1
Tags: angular, typescript, interview, angulartips
Published: 2021-04-11 10:24:26

#Components
How is changing the CD strategy to onPush impact component?
How to make child component data two way data binding?
What is the dynamic component?
What is an angular element?
What is a component factory resolver?
In Parent to child component communication. suppose an object have two properties only change in one property in parent, Will change reflect in the child component?
When change detection runs?
What is Virtual Scroll?
How to design drag and drop functionality?
What is application ref?
In which life cycle hook Viewchildren and content children can be accessed? 


#Templates
Define Styling precedence ?
Difference between @Attribute() vs @Input()?
How to use svg file as templates?
Template type checking in custom directive?
3 Mode of template type checking?
ngAfterContentChecked and ngAfterViewChecked?
Write code for custom pipe for change the string to title case? How impure pipe impact angular.
How pipe change detection works for primitive and references objects ?
What is use of Async pipe ?
Which have higher precedence between pipe and ternary operator ?
What is innerHtml?.
How to made custom two way binding like ngModel?
 What happens if assign template local reference variable on ng-template?

#Directives
What is template input variable?
Which Module need to import for using built in directives? 
Is angular selector support parent child relationship ?
Explain Hostbinding, Hostlistener?
Explain ContentChildren and ViewChild ?
Write the syntax for ngClass use cases?
Tell the use case of ngModel Change ?
Explain the use of trackby?
How to host a directive without Dom?
What is ElementRef use?
How to stop/Deactivate the processing of directive or binding ? 
How to create template fragments ?
What is template guard?
What we use common module? If we don’t include that common module then what happen?
#Dependency Injection
What is a provider token?
How to provide an alternative Class provider?
What is a factory provider?
What is a parameter decorator?
Making dependency option and search with a host?
How to alias class interface?
How to inject an object? syntax also?
What is the use of @Inject  or How to supply a custom provider?
What is meta data?
If we not provide the Injectable then how does it impact?
When do we use useValue , useFactory ?

#Routing & Navigation
What is the difference between canLoad and canActivate?
What is a router event ? name the any of ?
Differentiate the param and query param in lazyloading?
How to redirect any path ?
What does pathMatch signifies ?
What are auxiliary routes?
What is canResolve route guard?
What is the location strategy? Please enlighten the type also? Or There are two kind of Url one with hash one without hash compare both?
Explain the properties of the activated route?
How to use a scroll event in navigation?
Name the navigation event trigger when loading lazyload routes?
What is router outlet?
What is URL tree?
What does a route guard return?
Manipulating arrays in javascript. 
Tags: javascript
Published: 2021-04-11 10:03:05

Hi guys, 
Today we are going to see ways in which arrays can be manipulated in javascript. We are going to focus on 4 main ways of doing that. 
1. PUSH . 
  The push function appends data at the end of an array. Take an example. 
```
  var myArray = [] 
  myArray.push(1)
  console.log(myArray)
```
  We can also use the push() function to append more than one element into an array.
```
  var myArray = [] 
  myArray.push(1,2,3)
  console.log(myArray)
```
2 . Pop function. 
 The pop function is used to remove the last element of an array and return the removed element. 
```
    var myArray = [1,2,3,4]
    var removedArray = myArray.pop()
    console.log(removedArray)
```
3 . Shift function. 
  The shift function is used to remove the first element of an array and returns the removed element.
```
    var myArray = [1,2,3,4]
    var removedArray = myArray.shift()
    console.log(removedArray)
```

4 . Unshift function. 
The unshift function is used to add elements at the beginning of an array. 
```
    var myArray = [1,2,3,4]
    myArray.unshift(0)
    console.log(myArray)
```
That's all for today guys and I hope this short guide will help you understand the manipulation of arrays in javascript.
Decorators in python
Tags: python, decorator
Published: 2021-04-11 09:46:20

---
title: Decorators in python
published: true
description: 
tags: python, decorator
//cover_image: https://direct_url_to_image.jpg
---

Before learning decorators in python, lets check what is decorator in general.

As the name itself says, decorator means, decorating or wrapping. If we say, decorating a table means making the table more beautiful by adding/placing other things like flowers, lights etc. So decorating basically means adding/modify extra things to make things looks differently.

A similar way, in python, decorators means decorating or wrapping functions. We can add some more functionality before/after executing the actual function.

Let's see this with example.

### Decorator example with no arguments: 
```
# Normal function
def add_num():
    return 2 + 3

# Decorator function
def decorator_func(fun):
    def wrapper():
        res_str = f'Sum of 2 + 3 is '
        re = fun()
        return res_str + str(re)
    return wrapper
```

Normal function call:
```
add_num()
```
Output:
`5`

Decorator function call:
```
dec_result = decorator_func(add_num)
print(dec_result)
```
Output:
`Sum of 2 + 3 is 5`

<span style="color:blue">In Decorator function, we added an extra string value to make the result more clear. In this way decorators are very useful.</span>.


Instead of calling decorator function directly, we can use annotations by using @ symbol like below
```
@decorator_func
def add_num():
    return 2 + 3
```
Normal function call with decorator annotation:
```
dec_annot_call = add_num()
print(dec_annot_call)
```
Outout:
`Sum of 2 + 3 is 5`

### Decorator example with arguments:
To pass arguments to the decorator function, we need to use keyword arg params *args and *kwargs like shown below.

```
# Decorator function with arguments
def decorator_func(fun):
    def wrapper(*args, **kwargs):
        res_str = f'Sum of {args[0]} + {args[1]} is '
        re = fun(*args, **kwargs)
        return res_str + str(re)
    return wrapper

# Decorator annotations for normal function with args
@decorator_func
def add_num(arg1, arg2):
    return arg1 + arg2

# Calling with args
dec_annot_call = add_num(8, 9)
print(dec_annot_call)
```
Output:
`Sum of 8 + 9 is 17`
Go, the Language You Love to Code In
Tags: go
Published: 2021-04-11 09:42:59

[Go](https://golang.com) is a programming language that makes it easy to build simple, reliable, and efficient software. Whether it’s [microservices](https://golangr.com/rest-api-in-golang/), [web servers](https://golangr.com/golang-http-server/), or distributed systems, Go makes building and deploying complex applications fast and easy.

Go compiles quickly to machine code yet has the convenience of garbage collection and the power of run-time reflection. It's a fast, statically typed, compiled language that feels like a dynamically typed, interpreted language.

**1: Install Go.**

Go is a command line tool and works on all platforms (Windows, macOS, Linux). If you need to download the install it on your machine you can visit [this page](https://golang.org/dl/).

You can also use [GoLand](https://www.jetbrains.com/go/). GoLand is a complete development environment for the Go programming language. It features code completion, syntax highlighting, real-time error checking (like a spell checker), and typing assistance.

![goland go ide](https://www.jetbrains.com/go/img/screenshots/2_Navigation_Search.png)

**2: Start playing with Go!**

Like many languages, the hello world program is a good place to start. In Go that looks like this:

```go
package main

import "fmt"

func main() {
   fmt.Println("Hello, World!")
}
```

Once you have go installed on your machine you can start using the interactive prompt:

```go
$ go run helloworld.go
Hello, World!
```

That's about all there is to it! This [tutorial](https://golangr.com/) is a great place to start learning more about Go.

Go's standard library is extensive and rich with functionality.
Setup for Canon Printer
Published: 2021-04-11 09:35:59

If you have purchased a new Canon printer, you get first-time to <a href="https://canon-comijsetup.com/" target="_blank">setup for canon printer</a> instructions with us. Your device is working fine but not now; we help restore Canon printers to their normal function. We assist you in choosing the best network connection method depending on the eligibility. Finally, you get a solution for the following when you are dealing with your Canon printer.

Based on the computer operating system, you can download the driver directly by the link we provide below. Drivers can be customized based on your printing needs. It is a complete package containing many software applications for printing, scanning, automatic driver installation, and more. There are utility tools available along with drivers that help you troubleshoot many problems with your Canon printer. Click the download button for the driver according to the computer OS and get the driver at <a href="https://canon-comijsetup.com/" target="_blank">Canon.com/ijsetup</a>.
Five Reasons Why I Love Python
Published: 2021-04-11 09:30:31

There are a lot of things I love about [Python](https://python.org), but here are five reasons why I love Python and the community around it.

A couple of years back I had a conversation with a friend who was learning Python. We were discussing how I was able to learn Python easily. He asked me if I knew any tricks to learn Python quickly.

I said I didn’t know any tricks. I was just a nerd who loves playing with code on my computer. I don’t know why I was able to learn it quickly. It just happened.

* **Python is easy to read and write**

Python has a [simple and clean syntax](https://pythonbasics.org), which makes it a joy to use! There are many programming languages out there, but to me, none is better than Python. Yes, I know, this is a bold statement to make about a programming language. 

* **Great Community**

One of the best things about Python is the community. The amount of people willing to help you, and the amount of resources available, are amazing .

* **Clean Code**

Python has very strict syntax rules which makes your code much more readable than in many other languages. This enables you to write code faster , while having full code coverage (it’s always great to see a 100% line coverage on your unit tests).

* **It’s regular and consistent.**

Python follows a very regular syntax - indentation determines how the rest of the line is structured. If you’ve ever used JSX or XML you’ll instantly feel at home. All of the quirks of Python are there for a reason - it works. There are clear and easy to understand rules throughout the language, which makes it much easier to parse quickly and remember specific parts of the language when needed.

* **Tons of freely available libraries.**

You can make GUI apps with [pyqt](https://pythonpyqt.com/), [tkinter](https://python-commandments.org/tkinter-basics/), make web apps with [Flask](https://pythonbasics.org/flask-tutorial-hello-world/) or [Django](https://pythonspot.com/django-tutorial-building-a-note-taking-app/) and even do [Machine Learning](https://pythonprogramminglanguage.com/python-machine-learning/) with sklearn
Seo Resources
Published: 2021-06-17 08:27:16

---
title: Seo Resources
published: true
date: 2021-04-11 09:09:09 UTC
tags: 
canonical_url: https://boobo94.github.io/resources/seo-resources/
---

## 1. [Here’s why you can’t blindly trust keyword search volume for traffic estimations](https://ahrefs.com/blog/keyword-traffic-estimation/)

The practical application of the keyword search volume metric is quite obvious. We use it to determine how much organic search traffic our page will get if it ranks on the front page of Google for a given keyword.

## 2. [6 Best Keyword Research Tools for SEO](https://ahrefs.com/blog/best-keyword-research-tools/)

Are you overwhelmed by the number of keyword research tools available? Here are the best keyword research tools for 2018 (as per our testing):

- Ahrefs Keywords Explorer (23/25 points)
- KWFinder (20/25 points)
- Moz Keyword Explorer (14/25 points)
- SEMRush Keyword Magic Tool (13/25 points)
- Long Tail Pro (12/25 points)
- SERPStat Keyword Research Tool (10/25 points)

## 3. [Google officially throttling Keyword Planner data for low spending AdWords accounts](https://searchengineland.com/google-officially-throttling-keyword-planner-data-low-spending-adwords-accounts-255795)

According to Google, “most” advertisers will see Keyword Planner data as usual. But AdWords users with a “lower monthly spend” could see limited data in the planner. How limited? Very. The ranges that Google will provide for those with small (or no) spends makes the tool almost useless.

## 4. [13 Free Ways to Promote Your Business](https://ahrefs.com/blog/how-to-promote-your-business/)

Here’s a list of tactics we’ve used at Ahrefs to grow +65% year-on-year. They’re mostly free. You can use them to promote your business too.

- Get listed on popular directories
- Blog regularly
- Create YouTube videos
- Repurpose your content on multiple channels
- Build an email list
- Run a giveaway
- Get featured on podcasts
- Write guest posts
- Partner with other relevant businesses
- Get your product reviewed
- Create a comparison page
- Speak at events
- “Jab” on social media

## 5. [What is a Backlink? How to Get More Backlinks](https://ahrefs.com/blog/what-are-backlinks/)

Backlinks are links from a page on one website to another. If someone links to your site, then you have a backlink from them. If you link to another website, then they have a backlink from you.

## 6. [What Are Long-tail Keywords? How to Find and Use Them](https://ahrefs.com/blog/long-tail-keywords/)

Long-tail keywords are terms with low search volumes. Despite what many people think, it has nothing to do with how long or short a keyword is, how well it’s likely to convert, or how specific it is.

## 7. [Keyword Difficulty: How to Determine Your Chances of Ranking in Google](https://ahrefs.com/blog/keyword-difficulty/)

Finding a bunch of keywords that you want to rank for is easy. The hard part is figuring out what it’ll take to rank for those keywords (i.e., “keyword difficulty”), and then using that information to prioritize and plan your SEO strategy.

[Seo Services with ❤ from Cmevo](https://cmevo.com/seo-services/)
Awesome 404 Page Templates for your Websites
Tags: 404, html, sass, javascript
Published: 2021-04-11 08:48:42

There are different HTTP response status codes.

Especially, the 404 one.

Now, we wouldn't want our 404 pages to look dull right?

So, here are some cool 404-page templates for your website:

# 1. Neon 404 Page

{% codepen https://codepen.io/code2rithik/pen/XWpVvYL %}

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Responsive: Yes

Dependencies: None

# 2. Flashlight 404 Page

{% codepen https://codepen.io/code2rithik/pen/wvgpVQm %}

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Responsive: Yes

Dependencies: jQuery.js

# 3. Space 404 Page

{% codepen https://codepen.io/code2rithik/pen/LYxewMN %}

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Responsive: Yes

Dependencies: jQuery.js

# 4. Console Style 404 Page

{% codepen https://codepen.io/code2rithik/pen/PoWQYGa %}

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Dependencies: None

# 5. Sassy 404 UI Study

{% codepen https://codepen.io/code2rithik/pen/MWJQgwN %}

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Responsive: Yes

Dependencies: None

# 6. 404 Makes Bear Sad

{% codepen https://codepen.io/code2rithik/pen/BapYBoP %}

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Responsive: Yes

Dependencies: React.JS, React-dom.JS

# 7. Space 404 Page 2

{% codepen https://codepen.io/code2rithik/pen/vYgdBLe %}

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Responsive: Yes

Dependencies: bootstrap.css, gsap.js

# 8. 404 Scary Investigation

{% codepen https://codepen.io/code2rithik/pen/NWdyKNE %}

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Responsive: Yes

Dependencies: anime.js

# 9. Monument Valley Inspiration 404 Page

{% codepen https://codepen.io/code2rithik/pen/YzNeKWr %}

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Dependencies: None

# 10. Crossword  404 Page

{% codepen https://codepen.io/code2rithik/pen/PoWQYoR %}

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Dependencies: jQuery.js

------------------------------x----------------------------

Thank You for Reading this Blog,

If you liked it, do share it with your friends and remember...

# Keep Coding Y'All 👨🏻‍💻
Apex Testing
Published: 2021-04-11 08:46:39

Syntax
```@isTest static void testName() {
    // code_block
}```
or
```static testMethod void testName() {
    // code_block
}```

**Code Coverage**: common cause of lower coverage is because code is not covering all data values for conditional code execution


**Exception Handling**
Built in Exception: 
*DmlException: Any problem with a DML statement, such as an insert statement missing a required field on a record.

*ListException:Any problem with a list, such as attempting to access an index that is out of bounds.

*NullPointerException: Any problem with dereferencing a null variable.

*QueryException:Any problem with SOQL queries, such as assigning a query that returns no records or more than one record to a singleton sObject variable.

*SObjectException: Any problem with sObject records, such as attempting to change a field in an update statement that can only be changed during insert.

**Common Handling Methods:**
*getCause: Returns the cause of the exception as an exception object.
*getLineNumber: Returns the line number from where the exception was thrown.
*getMessage: Returns the error message that displays for the user.
*getStackTraceString: Returns the stack trace as a string.
*getTypeName: Returns the type of exception, such as DmlException, *ListException, MathException, and so on.
*getDmlFieldNames(Index of the failed record): Returns the names of the fields that caused the error for the specified failed record.
*getDmlId(Index of the failed record): Returns the ID of the failed record that caused the error for the specified failed record.
*getDmlMessage(Index of the failed record): Returns the error message for the specified failed record.
*getNumDml: Returns the number of failed records.
Recently I decided to become a freelancer
Tags: career, csharp, react, javascript
Published: 2021-04-11 08:37:52

I started my software developer career in 2016 as an employee in corporations. I learned a lot and I had very cool colleagues. I started working as a game developer in Unity3D.

After a year and 3 months I decided to change the corporation and started working for a bank in Italy, Milan. I worked in this bank for almost 1 year and a few months. The experience was very beautiful because I was working in a foreign country and I was starting to travel.

After this experience I changed the corporation again and started working in the financial field. I work with Microsoft .net technologies on the backend and API integration side. 

The financial project was very complex. It was a web application from which I learned a lot. I had almost 5 years of experience in the field, but I didn't seem to be fully satisfied.

Something was missing, but I didn't know what. I lacked freedom and independence.

In 2021 I decided to try to find clients and become a freelancer.
I started looking for projects on linkedin, upwork, everywhere. Finding clients becomes a real challenge for me.

In the end, I found my first clients with the help of closed freelancing platforms like: [We are hiring](https://www.wearehiring.top/)	

At this moment I benefit from all the advantages of this lifestyle and my income has tripled.

How did you manage to find your first clients as a freelancer?
Apex Triggers
Published: 2021-04-11 08:36:20

Types:
**Before Trigger**: Executes Before save
**After Trigger** : Executes After save

**Trigger Events:**
*before insert
*before update
*before delete
*after insert
*after update
*after delete
*after undelete

**Trigger.New**: contains all the records that were inserted in insert or update triggers.
Holds only base fields and not related fields information

**Trigger.Old**: provides the old version of sObjects before they were updated in update triggers, or a list of deleted sObjects in delete triggers.

**Before Trigger**:The system saves the records that fired the before trigger after the trigger finishes execution. Hence No DML requrired

**Trigger Context Variables**
*isExecuting
*isInsert
*isUpdate
*isDelete
*isBefore
*isAfter
*isUndelete
*new
*newMap
*old
*oldMap
*operationType	
*size
https://trailhead.salesforce.com/content/learn/modules/apex_triggers/apex_triggers_intro?trailmix_creator_id=shibua&trailmix_slug=ust-sfdc-dev-apex-vf-basics

**Trigger Exceptions**
addError(): For preventing records from being saved when certain conditions are met
**Callouts**:Apex calls to external Web services
Callout must be done asynchronously so that the trigger process doesn’t block you from working while waiting for the external service's response. The asynchronous callout is made in a background process, and the response is received when the external service returns it for eg, @future(callout=true)




**HOw to Bulkify trigger**
https://trailhead.salesforce.com/content/learn/modules/apex_triggers/apex_triggers_bulk?trailmix_creator_id=shibua&trailmix_slug=ust-sfdc-dev-apex-vf-basics
How-to Decode Outputs in NLP
Tags: python, deeplearning, machinelearning, datascience
Published: 2021-04-11 08:31:59

{% youtube QJq9RTp_OVE %}

In this video, we will cover three ways to decode the output probabilities from NLP models - greedy search, random sampling, and beam search.

Learning how to decode outputs can make a huge difference in diagnosing model issues and improving text output quality - and as an added bonus it's super easy.

One of the often-overlooked parts of sequence generation in natural language processing (NLP) is how we select our output tokens — otherwise known as decoding.

You may be thinking — we select a token/word/character based on the probability of each token assigned by our model.

This is half-true — in language-based tasks, we typically build a model which outputs a set of probabilities to an array where each value in that array represents the probability of a specific word/token.

At this point, it might seem logical to select the token with the highest probability? Well, not really — this can create some unforeseen consequences — as we will see soon.

When we are selecting a token in machine-generated text, we have a few alternative methods for performing this decode — and options for modifying the exact behavior too.

In this video we will explore three different methods for selecting our output token, these are:

```
- Greedy Decoding
- Random Sampling
- Beam Search
```