teleren/devto huggingface dataset:
Useful Git Commands.💻
Tags: github, git, tooling, commands
Published: 2021-06-01 07:25:58

#### Git is an example of a distributed version control system commonly used for open source and commercial software development.

> Let's go :
initalize git in files/directories.
```
git init
``` 
1.Clone the repository in your local system.
```
git clone https://github.com/<your-user-name>/<repo-name>
``` 
2.Connect to remote
```
git remote add origin <url>
```
3.To check the current status of the repository.
```
git status
```
4.To add specific file to the staging area.
```
git add <file-name>
```
5.To add all changed file to staging area.
```
git add .
```
6.To unstage a certain file
```
git restore --stagged <filename>
```
7.To see recent changes in the repository.
```
git diff
```
8.To give a message and commit.
```
git commit -m "your-message"
```
9.To see the commit history.
```
git log
```
10.To see last specific commits (eg. Last 3 commits).
```
git log -3
```
11.To discard the specific commit.
```
git revert <commit-token>
```
12.To undo the commit and bring back changes to staging area.
```
git reset --soft HEAD <no._of_commit_to_revert>
```
13.To show remote URLs
```
git remote -v
```
14.To fetch the changes from origin to your local system.
```
git pull origin
```
15.To create a branch named branch-name.
```
git branch <branch-name> 
```
16.To make changes in the specific branch.
```
git checkout <branch-name>
```
17.To merge sub branch to main branch.
```
git merge <branch-name>
```
18.To delete a specific branch.
```
git branch -d <branch-name> 
```
19.To push the recent commits.
```
git push origin <branch-name>
```
20.Connect to remote
```
git remote add origin <url>
```
21.To push the current branch and set the remote as upstream
```
git push --set-upstream origin master
```
22.To rename branch name.
```
git branch -m <branch-name>
```
23.change url for git remote repo
```
git remote set-url origin
```
7 Best Advanced Data Science Courses in 2021
Tags: datascience, machinelearning, analytics, analyst
Published: 2021-06-01 07:11:46

Are you a **working professional** and looking for the best advanced data science courses? If yes, then you are in the right place. In this article, you will find the **7 Best Advanced Data Science Courses**.

To gain data science skills, there are numerous courses available. But I have filtered these courses on the **following criteria**-

##**Criteria-**

1. Rating of these Courses.
2. Coverage of Topics.
3. Engaging trainer and Interesting lectures.
4. Number of Students Benefitted.
5. Good Reviews from various aggregators and forums.

So, without wasting your time, let’s start finding the 7 Best Advanced Data Science Courses–
**[Click to continue reading...](https://www.mltut.com/best-data-science-courses-for-working-professionals/)**
GirlScript Summer Of Code 2021 !! First Open Source Program !! 🤩🤩
Tags: opensource, webdev, firstpost, github
Published: 2021-06-01 07:09:37

### What is GSSOC?


**GirlScript Summer of Code** is the 3 month-long **Open Source Program** during summers conducted by **GirlScript Foundation,** with an aim to help beginners get started with **Open Source Development** while encouraging **diversity.** Throughout the program, participants contribute to different projects under the guidance of experienced mentors.

### How to Get Enrolled?

You have to register as a Participant or as Mentor. 

I have registered as a **Participant.** After getting selected I was informed by an **Email** and was asked to join **Discord Server!**
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ufhrc34u7z1vjfnf0430.png)


### Project !!

There were 100+ Projects which were open for contribution with different tech stacks!! My major contribution was in Single Project  **SFC-Foundations Website.** 

**SFC - Foundation** is an NGO that is active in Northern India. The project was to create a new website from Scratch. I was having basic knowledge of **Front-end Development** so I selected this project to work on !!



### Contribution Statistics ( Till 1st June 2021 ) 

Project :-   {% github himanshu007-creator/SFC-foundations %}

Commits:- 206 ( On 1st June ) 

Addition :- 44,311 ++

Deletions :- 15,429 --

Issues Created :- 81

Pull Requests Created :- 72 ( 70 Merged ) 

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g0pbtk36guc7u3re1ipr.png)


### Learnings:- 

-> Got Experience in Real-World Development 
-> Learned to work with the group.
-> Workflow of GitHub 
-> Learned how to set up a particular Project on `Local System`
-> Had a great Networking with Amazing Peoples! 
-> Brushed Up My Skills of Front-end Web Development! 

Get Connected with Me 🙂
[LinkedIn](https://www.linkedin.com/in/rohan-k-2502/)
[GitHub](https://github.com/rohan-kulkarni-25)
[Twitter](https://twitter.com/rohan_2502)
Get Data From DynamoDB Using AWS SDK (Go) - The Cloud Resume Challenge Series (Part 15)
Tags: devops, cloud, aws, serverless
Published: 2021-06-01 06:59:28

---
title: Get Data From DynamoDB Using AWS SDK (Go) - The Cloud Resume Challenge Series (Part 15)
published: true
tags: #devops #cloud #aws #serverless 
---

Hey cloud engineering friends! 

Over the past weeks I've been completing [the cloud resume challenge](https://cloudresumechallenge.dev/). It's a free challenge started by AWS hero Forest Brazeal to help people get into the cloud by doing a hands-on project. [Original announcement post here](https://dev.to/forrestbrazeal/the-cloud-resume-challenge-503g).

The challenge is to create an online resume with a view counter, this video is the last piece of the puzzle for the view counter, by getting the view count out of my DynamoDB database and returning it as part of an AWS Lambda function that's set up as a REST/HTTP API. 

As a bonus, I also go through how to set up AWS SAM with local invocation, so that you can test your lambda locally, by passing in AWS credentials using [aws-vault](https://github.com/99designs/aws-vault), which involves a little bit of Docker, too. 

{% youtube nc7pPfn4BsY %}

If you're thinking getting into cloud I do really recommend you check out the cloud resume challenge as a place to start! 

---

Hey! 👋 If we haven't met, let me introduce myself, I'm [Lou](https://twitter.com/loujaybee), and I created _[Open Up The Cloud](http://thedevcoach.co.uk/)_ to help you get your start, and grow your career in cloud 🚀. 

If you're interested in cloud, the best way to keep up-to-date with news, and everything I publish is via the [monthly cloud newsletter](http://newsletter.thedevcoach.co.uk/). And find _Open Up The Cloud_ on [YouTube](https://www.youtube.com/channel/UCAklaE5D59xWtip-3Jwa7xA), [Twitter](https://twitter.com/openupthecloud), [Instagram](https://www.instagram.com/openupthecloud)... wherever you like hang out! 😄
Best Search Engine Optimization tool for developers
Tags: offers, beginners, webdev
Published: 2021-06-01 06:33:55

Hi,

Your Website without SEO is Like That Top End Car without Fuel. 

If you are new at seo then I am back with a new tool that might be suitable for you if you have a blog or website.

Today in this article I will introduce [Semrush](https://semrush.sjv.io/DVA7e2).

**What is SEO?**

Search engine optimization is the process of improving the quality and quantity of website traffic to a website or a web page from search engines. SEO targets unpaid traffic rather than direct traffic or paid traffic.

**What is Semrush?**

Semrush is an all-in-one tool suite for improving online visibility and discovering marketing insights. Our tools and reports are able to help marketers that work in the following services: SEO, PPC, SMM, Keyword Research, Competitive Research, PR, Content Marketing, Marketing Insights, Campaign Management.

**Semrush is a premium tool but after following this article you will get pro access for free**

![Semrush](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4sekr4j710bo53dsdmtg.jpg)

### Here is How to get Semrush Pro for free?

1. Go to Semrush offer page [from here](https://semrush.sjv.io/DVA7e2)
2. Click on start your free trial button
3. Now create your account
4. Choose a Trial plan and then click on the get free trial button.

That's it :)

Note: This tool is easy to use and user friendly. 

Enjoy
Getting the "nuget" package manager working in Visual Studio 2019
Tags: fsharp, visualstudio, nuget
Published: 2021-06-01 06:23:59

The other day I was working with a collegue on some quick file manipulation with F# interactive (.fsx) in VSCode using the excellent Ionide extension. 

We ran into some trouble with Danish letters and encoding and I knew from previously that for reason Visual Studio seems to handle encoding problems in files somewhat better than VSCode.  So we decided to try VS instead.

Don't worry, this post is not about encoding 😉

## The Problem
However, we did not get very far with VS.  We used the new [F# 5.0 way of referencing Nuget packages](https://docs.microsoft.com/en-us/dotnet/fsharp/tools/fsharp-interactive/#referencing-packages-in-f-interactive):
```fsharp
#r "nuget: FSharp.Data"
```
But VS wouldn't let us have our way and it complained:
```cmd
error FS3216: Package manager key 'nuget' was not registered in
...
[C:\program files (x86)\microsoft visual studio\2019\professional\common7\ide\commonextensions\microsoft\fsharp\Tools]
```
Intensive searching on the internet provided us with almost no help whatsoever, except for a bit help on [Paket's page](https://fsprojects.github.io/Paket/fsi-integration.html) on fsi integration.  Apparently we were the only two people in the world who could not get this stuff working.

## The Solution
A bit more searching also revealed that [FSharp.DependencyManager.Nuget](https://www.nuget.org/packages/FSharp.DependencyManager.Nuget) is required.  It is the F# [extension manager](https://github.com/fsharp/fslang-design/blob/dcc45b557f713a9aee75d85eae7555d41cd1cb0b/tooling/FST-1027-fsi-references.md) for Nuget which gives us the coolness of `#r "nuget"`.

That brings us to the final solution:

1. Install FSharp.DependencyManager.Nuget with nuget.exe.
2. Copy the file FSharp.DependencyManager.Nuget.dll to the directory mentioned in the error (in our case C:\program files (x86)\microsoft visual studio\2019\professional\common7\ide\commonextensions\microsoft\fsharp\Tools).

That's it.  It took us only 2-3 hours to figure that out 🤦‍♂️🤦‍♂️.  

I hope this can be helpful to the third person in the world that runs into this problem.
Create S3 Bucket using Python Boto3
Tags: aws, python, boto3
Published: 2021-06-01 06:18:05

S3 Operation using Python Boto3 like Create Bucket, Delete Bucket, Upload File, Delete File, and list Buckets

**BOTO3 Installation**
`pip install boto3`

{% youtube oBJFf2VSizo %}

###### AWS Configuration

Before using Boto3, you need to set up authentication credentials for your AWS account using either the IAM Console or the AWS CLI. You can either choose an existing user or create a new one.
If you have the AWS CLI installed, then you can use the AWS configure command to configure your credentials file.

`aws configure`

###### Boto3 Configuration
To use Boto3, you must first import it and indicate which service or services you're going to use
`import boto3`
`# Reference for Amazon S3 Resource`
`s3 = boto3.resource('s3')`

Client and Resource are two different abstractions within the boto3 SDK for making AWS service requests. You would typically choose to use either the Client abstraction or the Resource abstraction. I've outlined the differences between Client and Resource below to help readers decide which to use.

`import boto3`
`# Reference for Amazon S3 Resource`
`client = boto3.client('s3')`

#### List S3 Bucket Example using client
`import boto3 `
`client = boto3.client('s3')`
`list_bucket=client.list_buckets() `
`for bucket in list_bucket['Buckets']:    `
   `print(bucket['Name'])`
Closures in Javascript
Tags: javascript, tutorial, programming, coding
Published: 2021-06-01 06:04:27

Welcome to this blog on Closures which makes many of the JS developers scratch their heads in understanding this cool concept.
I am going to show you-
1. what are closures?

2.What are advantages of using closures?


What are closures?
------ 
A closure is a combination of **function bundled together with it's lexical environment** . By lexical environment it means that the function is enclosed or bundled with references to the surrounding state.
Long story short is that closure gives access to the outer function's scope from an inner function.

####1.Snippet-
```
function outer() {
    let a = 100;
    function inner() {
        console.log(a)
    }
    inner()
}
outer()
```
This will output 100 because inner() has formed a closure with outer() and it retains the reference to its outer function's scope.

####2.Snippet-
```
function outer() {
    var a = 100;
    return function inner() {
        console.log(a)
    }
    
}
var closure=outer()()
```
This will output 100 because on calling outer function it returns inner function to where it was invoked that is last line of this snippet. There once it is called it will still return 100 as it retains references of its surrounding function.

####3.Snippet-
```
function outer() {
    let a = 100;
    return function inner() {
        console.log(a)
    }
    
}
var closure=outer()()
```
The beauty of closures is it even works with 'let' variables .
As we know let has a block scope so it should return undefined outside the block but just because of closures it still prints 100

####4.Snippet-
```
function grandparent(){
    let b=200;
    function parent() {
        let a = 100;
        return function child() {
            console.log(a,b)
        }
        
    }
   return parent()
}

var closure=grandparent()()
```
The output of this code snippet will be 100,200 because child forms a closure with its surrounding functions which are parent and grandparent functions and hence when grandparent() is executed outside then child() forms a closure with both of these functions.

By now ,i guess you must gotten the feel of closures.
Basically closures help us in many ways.Let's see its advantages.

Advantages?
------ 
Closures provide a way to achieve **data hiding and encapsulation** so that the scope which forms a closure cannot be accessed outside and remains private

####1.Snippet-
```
function maths(a,b){
  return  function add(){
        console.log(a*b)
    }
}
maths(10,30)()
console.log(a,b)
```
The output of this code piece will be 300 at maths(10,30)() since add() forms closure with maths(a,b) and its arguments.
But console.log(a,b) returns **Reference Error** because closure scope is hidden outside and is accessible only by calling add().
Thus,helps in keeping data hidden and private.
Formatting strings in Python
Tags: python
Published: 2021-06-01 05:58:49

As you may know, I work mainly with JavaScript these days. After seeing [JavaScript has these amazing template literals](https://daily-dev-tips.com/posts/javascript-template-literals/). I was wondering if something like that existed in Python.

And it does, in some way!

There is something called string formatting in Python.

## String formatting in Python

How it works is that we use a placeholder `{}` (curly brackets) inside a string. We can then use the `format()` function to replace these curly brackets with a variable or other string.

A real-world example.

```python
name = 'chris'
text = 'His name must be {} right?'
print(text.format(name))
```

Which will return: "His name must be chris right?"

Already pretty cool and helpful!

Often you want to have multiple elements you want to replace, so let's see how that works.

```python
firstname = 'Chris'
lastname = 'Bongers'
text = 'Firstname: {}, Lastname: {}'
print(text.format(firstname, lastname))
```

Which will print: "Firstname: Chris, Lastname: Bongers"

As you can see, we can add multiple bracket placeholders!

## Numbering string placeholders in Python

But let's say you want to re-use a placeholder. We can simply choose to number the placeholders with numbers.

```python
name = 'Chris'
age = 32
text = 'His name is {0}, {0} is {1} years old'
print(text.format(name, age))
```

This will result in: "His name is Chris, Chris is 32 years old".

We used the name variable twice under the first index (0).

Another way to do this is to name the variables if you are unsure about the order.

```python
name = 'Chris'
age = 32
text = 'His name is {name}, {name} is {age} years old'
print(text.format(name=name, age=age))
```

This will result in the same as above but might make more sense to use than the number method.

### Thank you for reading, and let's connect!

Thank you for reading my blog. Feel free to subscribe to my email newsletter and connect on [Facebook](https://www.facebook.com/DailyDevTipsBlog) or [Twitter](https://twitter.com/DailyDevTips1)
Base field class for form generator
Tags: php, form, generators, html
Published: 2021-06-01 05:56:58

## Intro
This class will help you to construct forms in PHP code.

## Installation

Just print in console

```
composer require mezon/field
```

And that's all )

# Learn more

More information can be found here:

[Twitter](https://twitter.com/mezonphp)

[dev.to](https://dev.to/alexdodonov)

# Reference

Method compiles field into HTML code:

```php
public function html(): string
```

Method returns title for the field:

```php
public function getTitle(): string
```

Method returns true if the field is required, false otherwise:

```php
public function isRequired(): bool
```

Method returns true if the field is visible and false otherwise:

```php
public function isVisible(): bool
```

Method returns true if the field has label, false otherwise:

```php
public function hasLabel(): bool
```

Method returns true if the field fills the whole row in the form, false otherwise:

```php
public function fillAllRow(): bool
```

# It will be great if you will contribute something to this project. Documentation, sharing the project in your social media, bug fixing, refactoring, or even **[submitting issue with question or feature request](https://github.com/alexdodonov/mezon-field/issues)**. Thanks anyway )
Personal vs. Natural Goals
Published: 2021-06-01 05:52:28

I have wanted to write about this for a long time. I have seen that there are two types of Goals if I can even give it that honor. In actual terms, one is a Goal, and the other is a delusion. One is natural and the other is an un-natural personal one.

When we make a goal, the reason or the intent behind it is the power behind that goal. Have the wrong intention, and the target goes nowhere, and the real purpose will perpetually power that goal making you almost unstoppable.

That’s what happened to me while building my startup Proxies API.

Let me define this as well as I can.

A Personal goal has a very psychological origin to it. There is probably nothing in real life to support it. It’s almost unnecessary. It might be motivated by fear but an absolute psychological horror like shame or resentment or jealousy. These are optional emotions powered by people simply identifying with them. When powered by them, they have a Gollum like quality to them. There is something inherently ugly, pathetic, and selfish about them.

A Natural goal might also be fear-based in its origin. For example, you have received an advisory from the government that there is a massive hurricane headed your way, and you need to take precautions when it hits 48 hours later. It should create fear, which is natural and necessary. There is nothing wrong with feeling the fear and taking measures to counter the situation. Your “Goal” then becomes the survival of you and your loved ones, and you will have to do everything in your power to achieve it. The fear will power it. You don’t need Tony Robbins pumping you up, and you don’t need affirmations. You are powered by instinct.

Building Proxies API was like that for me. I HAD to escape the hurricane coming into my life. In this case, I had around a year, and I would be homeless with my loved ones (I won’t go into details here). It’s a real fear. I embraced it and set my goals.

Doing what was necessary came easy — no need for motivation. If I NEED motivation, then what’s the motivation behind lacking that motivation? I believe that if you need to generate it or fake it, then that’s not it. You haven’t got it; you are missing the point. It is best not to do it.

The single-minded dedication came easy too. If you have a hurricane hitting, trust me, you don’t need a ‘social media blocker’ to block off distractions. There is no process to it. You do it.

Once I achieve the goal, it can hardly be called achievement. There is probably a sense of relief. But there is a matter of fact about it. It merely needed to be done, and it is done.

The author is the founder of Proxies API the rotating proxies service.
What To Look For When You Hire A Web Scraping Agency?
Published: 2021-06-01 05:48:06

If you don’t have in-house resources like programmers and data managers, you have the option of using a cloud-based web crawling company like Octoparse.

But if you need someone to manage everything fully, maybe you can look for an agency with a good track record.

Web crawling and scraping is a lot about the ability to tame the chaos, and a lot of it is not under your control. Websites change code, change their navigation, put up restrictions, may even block your IP if you are not using rotating proxies like Proxies API, the network speeds go up and down — these are just the realities in the world of web scraping.

Here are the top 3 most important things to look for in an agency if you want:

a. A proven track record ideally looks for their presence on Upwork. It is a typical profile on Upwork. The most important I look for is a combination of high ratings (4.5 and above), enough experience (total hours worked), and a near 100% completion rate. You don’t want an agency abandoning your work midway ever. Read the customer reviews to get an idea of the vibe the team has with its customers.

b. The combination of skill sets — Web crawling is not just about coding; there will be a fair bit of manual work and wrangling with data. You can check the kind of skills they have in their team.

c. It’s ideal if they have listed web crawling or web scraping as a part of the leading service description. Like these guys.

Once you have shortlisted a few, you can ask them a few questions to further get a sense of the level of competence.

And here are 5 questions you can ask and notice how comfortable they are with the challenges they pose. Are they vague, struggling for clear answers, or are they ready for you and even impressed that you asked them these questions? So here they are:

a. Ask them what measures will they take to overcome restrictions like CAPTCHAs, rate limits, code changes, etc.

b. Go for the Jugular — Ask them how they will deal with a situation where the website IP blocks them.

c. What checks and measures have you built in to know if the web crawler is working as it should?

d. What framework do they use to build on top of and why: You don’t want them reinventing the wheel from scratch. It will NOT go well. Frameworks like Scrapy offer abstractions to control concurrency, support multiple spiders, CSS selectors for scraping, automatic link extractors, cookies support, etc.

e. Ask them how they will get data that is rendered by Javascript.

The author is the founder of Proxies API, a proxy rotation API service.