teleren/devto huggingface dataset:
Guide to Git and GitHub - Part 1
Tags: beginners, github, git, opensource
Published: 2022-02-16 12:06:03

Hello JuxtaCoders!

In my opinion, Git and GitHub are some of the most essential skills that every programmer must have. So, I am bringing this series where I share all the basics that you need to know to get comfortable with using Git and GitHub. I'll share some resources at the end to help you learn further.

---

## In this part we'll get an introduction to what Git and GitHub are.

Imagine you and your team are working on an application. Someone does a change in the code and the application crashes. At this stage, you have a few options. Either someone in your team remembers what the code looked like before making the changes, or, someone had a copy of the previous version of the code in their system which they can share with the team, or, in the worst case, you have to start all over again. Now, this won’t be a huge issue if a few people are working on a small application. But imagine working on thousands of lines of code, with tens or even hundreds of people making changes (or contributing). Here, if the application fails, it’ll be almost impossible to find someone who remembers what the code looked like before crashing!

This is where **Git** comes in. Git is a distributed **Version Control System**. Basically, it helps us keep track of the history of all the changes that were made in the codebase with the help of some commands. Also, in projects where many people are working on the same code, Git helps everyone to make changes on their own and add these to the original codebase (merging), without affecting others’ progress. 

Side note, a lot of people may confuse Git with a programming language, which it isn’t!

Now, using Git on its own can be complex for a lot of people. Not many people would want to learn how to set Git up in their system, its various commands and how to properly use them with your project, just to add a semicolon in your code (which is totally fair!). So, for a convenient user experience, there are many platforms that allow you to maintain your project in forms of repositories and collaborate with people from around the world. **GitHub** is one such platform. There are many more such platforms, like, BitBucket, GitLab, etc. But, GitHub is the most widely used. GitHub provides developers an efficient UI so that we can easily maintain our projects, contribute to other projects, or simply see how some of the widely used applications are built and maintained. 

To use GitHub, you don't necessarily need to learn the Git commands, you just need to be familiar with some basic terms and how to operate GitHub. But regardless, it is always beneficial if you know Git too (in my opinion). So, that's everything we'll be focusing on in this series.

---

That's all for now!! I hope this was helpful. In the next part, I'll continue with how to set Git in your system, some important commands, etc.

If there are any suggestions, feel free to share:)

Until next time... Happy Coding!
What are the Top 10 Most Popular Program Written in Python?
Tags: python, programming, webdev, beginners
Published: 2022-02-16 12:05:44


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cft0gf97c3ac8surg26x.jpg)
Looking to know about top 10 most popular [program written in Python](https://www.allupost.com/blog/what-are-the-top-10-most-popular-program-written-in-phython/). Which Social Media Channel Written in Python
How to Watch a Coding Tutorial ?
[BEGINNERS GUIDE]
Tags: beginners, programming, tutorial, productivity
Published: 2022-02-16 12:04:37

Tutorials are everywhere! Most people start watching tutorials when they start coding or learning a new programming language. There is nothing wrong with watching tutorials. But you should know how to do that in a right way.

## Focus.

When you are watching tutorials, focus on the video thoroughly. Don't sit and watch that as another entertainment video. If you don't get what the lecturer has explained, re-watch it until you get the idea. Try to understand the concepts.

Stop watching tutorials like a tv series. If you have completed one chapter and if you feel that you have understood all the concepts there, stop continuing watching the other chapters. 

## Did You Learn?

Only watching a 10-hour course on React JS doesn't mean that you know React JS. What would be your answer after one month, If you ask yourself, do you know React JS ? You may know the basic syntax of React JS. But you’ve never actually learned how to solve a particular problem with that.

## Give more priority to short courses ?

If you have already learned the fundamentals of programming I suggest you watch “Crash Courses” or “Short courses” when you want to learn a new programming language or tech stack. Easily you can get the basic idea of the new stack/language with those “Crash Courses”. 

## Trap…

Many people who are learning coding or programming languages are stuck for Tutorial Purgatory.

**‘Tutorial Purgatory’** is where you try to learn a skill by going from tutorials, videos , lectures, etc. You are feeling like you are learning. But you aren't because you are stuck when you ask to apply what you’ve learned.

## Build Build Build

Spend more time applying the knowledge that you have gained from tutorials. That is the most valuable part. 

Don't build the same thing that you have seen in tutorials. Try to develop simple projects first. Get your hands dirty with coding.

## Time

You may get many errors while implementing things, you may demotivate. But don't give up!

It's worth building a simple app than watching 100 tutorials. 

At one stage you will improve your skills and you will be able to apply the knowledge you gained from tutorials quickly.

Hope this will be helpful to new developers who are trying to learn programming. 

Welcome your suggestions and ideas :)
How to configure Git on Ubuntu and add ssh key to github
Tags: git, github, ubuntu
Published: 2022-02-16 12:02:51

 **About me**

Hello, Everyone. I’m  a back-end developer. I like cats and roller skating, I'm crazy for challenges and I am always looking to learn something really new. I love to write and I intend to continue writing about different subjects here. This is my first post and I'm open to suggestions and if there's anything wrong you can signal. 



Without further introductions let's get to the content.

It's not cool to needing to login every time that you have to push,actually you can solve it quite easily. You can just add your ssh key to github. Personally I use linux distribution Ubuntu as System Operator. 

##**Ubuntu**

**Installing Git and checking if it's working**

Usually the Git is already installed on Ubuntu, but sometimes is necessary to install. You can use the following command to install it

```
~$ sudo apt install git


```

<br/>

<br/>

 **Git**

You can make sure it's install by using the following command

```
~$ git
```

 If something like this comes up it means Git is already installed



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l0rp3a20kqsgh59yxnkk.png)

<br/>

<br/>

###**It's important to configure your username  and email  for  the commits from your user be recognized** 


Setting your user and email



```
~$ git config --global user.name "Meu Nome"
~$ git config --global user.email "meuemail@email.com"
```

Now you can see your configuration



```
~$ git config --global user.name
Meu Nome
~$ git config --global user.email
meuemail@email.com
```

##**Generating ssh keys**

```
~$ ssh-keygen -t ed25519 -C "your_email@example.com"


```

This command in addition to generating the public and private key using Ed25519 algorithm, it will return the path where your keys are, usually the path is /home/userLinux.



# Warning

You shouldn't show the private key to anyone


After locating where the .ssh keys were generated, you will copy the content from text file with .pub extension. This is your public key. 

### GitHub

 Adding public ssh key to GitHub

###### Go to Settings on your GitHub profile



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kxeysp64qdh7yxlqkfnw.png)

###### Section SSH and GPG keys



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dn1vc6ctked81wf6p85m.png)



###### Click on Button "new SSH Key"

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vlb3fd279xafsswml3ws.png)

You can  past your public key on text box and  choose a title and it's  ready! Git will not ask login anymore!

<br/>
if you are starting now I hope this helps.

Thx :smiley: cya...
Soi cầu lô VIP siêu đẹp ngày hôm nay chuẩn xác nhất miễn phí
Tags: soicaulovipkubet, soicaulovip, soicaulovipmienbac, soicaulovipmiennam
Published: 2022-02-16 11:57:05

Rất nhiều thành viên đã tiến hành soi cầu lô vip với nhiều chiến thuật khác nhau thấy kết quả về khả quan. Bản thân tôi đã vận dụng cách đánh soi cầu lô vip vào cuộc chơi của mình và đạt kết quả tốt. Vậy nên ngay hôm nay mỗi người cần có nhận thức về các kênh soi cầu, lựa chọn kênh tốt và tham gia xem gợi ý ngay.
Nếu như bạn đang không biết chơi lô đề thế nào mang tới phần thắng cao hơn cho mình thì nên học hỏi các gợi ý từ kênh soi cầu lô vip. Chúng giúp bạn hiểu hơn và đưa ra các quyết định chính xác, ăn thắng lớn bằng cách nào dễ dàng nhất.
Chi tiết liên hệ tại : 
Website : https://www.trongate103.com/ 
Twitter : https://twitter.com/soicaulovip 
Pinterest : https://www.pinterest.com/soicaulovipkubet 
Tumblr : https://soicaulovipkubet.tumblr.com/ 
Linkedin : https://www.linkedin.com/in/soicaulovipkubet/ 
Instagram : https://www.instagram.com/soicaulovipkubet/ 
Flickr : https://www.flickr.com/people/soicaulovipkubet/ 
Twitch : https://www.twitch.tv/soicaulovipkubet 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/05byhdq4qex76rieif9i.jpg)
Get request with Basic authorization for React Native Mobile application
Tags: react, reactnative
Published: 2022-02-16 11:42:47

Hey Dev Community,

Welcome everyone. 

This article is about how to use Fetch API Get request with Basic authorization for React Native Mobile application.

Basic Authentication is when raw(or with basic encoding) username and password is sent to the server, typically in its body

```
 headers: {
           Authorization: "Basic " + base64.encode(username + ":" + password),

```

Sending credential pair in 'Authorization' header of a request can be also considered as basic authentication request:

It consists of a prefix **Basic** (or some other word) and base64 encoding of username and password separated by colon **(:)**

**Authorization** key used in header can also be changed to some other name, while the server is configured to parse that key.

Check below code with comments for how I used.

```
const HomeScreen = () => {
  const [isLoading, setLoading] = useState(true);
  let [data, setData] = useState([]);

  let base64 = require("base-64"); // install it before use from npm i base-64

 const username = "some username goes here";
 const password = "some password goes here";

//function for Fetching data from API
const getMovies = async () => {
   try {
     const response = await fetch(
       "API URL goes here",
       {
         headers: {
           Authorization: "Basic " + base64.encode(username + ":" + password),
         },
       }
     );
     data = await response.json();

     setData(data);

     return data;
   } catch (error) {
     console.error(error);
   } finally {
     setLoading(false);
   }
 };

//use Effect hook
 useEffect(() => {
   getMovies();
 }, []);

return (
    <View style={styles.container}>
//rendering API data in FlatList view
        <FlatList
            keyExtractor={(item) => item.id}
            data={data}
            contentContainerStyle={styles.listCtn}
            renderItem={({ item }) => ( 
          <View style={styles.productImagesCtn}>
                <Image
                  style={styles.productImages}
                  source={{
                    uri: item.images[0].src,
                  }}
                />
          </View>
           )}
         />
       </View>
 );
};

export default HomeScreen;

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff',
    alignItems: "center",
  },

  productImagesCtn: {
    width: Dimensions.get("window").width / 3,
    marginVertical: 20,
  },
  productImages: {
    width: "100%",
    height: 158,
  },
listCtn: {
    justifyContent: "space-around",
    flexDirection: "row",
    flexWrap: "wrap",
  },
});
```

References used from: 
1. [https://newbycoder.com/react_native/auth_basi](https://newbycoder.com/react_native/auth_basic).
2. [https://stackoverflow.com/questions/34815853/react-native-fetch-and-basic-authentication/71122256#71122256](https://stackoverflow.com/questions/34815853/react-native-fetch-and-basic-authentication/71122256#71122256).

Give a suggestions for edit in comments will definitely fix.

Thanks for Reading.
Colorless async/await in Firefly
Tags: programminglanguages, firefly, javascript, computerscience
Published: 2022-02-16 11:39:01

In the last post, we sketched out the high level rules of the async/await inference. This post will show how it works under the hood for a concrete example that reads two files concurrently, and then concatenates the result:

```
readTwo(system: System, file1: String, file2: String): String {
    let pair = system.tasks.concurrently(
        {system.files.readText(file1)},
        {system.files.readText(file2)}
    )
    pair.first + pair.second
}
```

Continue reading: https://www.ahnfelt.net/async-await-inference-in-firefly-part-2/
React Js google auth
Tags: javascript, webdev, react, python
Published: 2022-02-16 11:26:23

Install react-google-login module
`npm install react-google-login`

step 2 :
Open Google developers console

Create new project
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8d5hg8fx8glbbldnhsxq.png)
 
Enter The Project Name
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z2udohwalpy3za68og5v.png)
 
Select you project -> Dashboard

select `OAuth` in the left side menu
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kxjrfzhsjp6qed6irlx0.png)
 
Creating OAuth Credentials:
1.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8f5lkeew5fml3v5rp78t.png)

2. Enter Project name and select you gmail id  
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o3zx9id4v4dwmf4qhk52.png)

3. Add your add domain for react add (https://localhost:3000)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a4uut02h9jzubp1iu0d5.png)


Now You can see the credentials in the dashboard 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f8qp34y1kapbl99dykoo.png)

**Setting Up in react** 
 

```
<GoogleLogin
         clientId={props.authid} // provide your clint id here
         onSuccess={responseGoogle}
         render={(renderProps) => (
           <button
             onClick={renderProps.onClick}
             disabled={renderProps.disabled}
             class="bi bi-google btn btn-dark"
           ></button>
          )}
          theme="dark"
          icon="false"
          onFailure={responseGoogle}
 />
```



```
const responseGoogle = (e) => {
   console.log(e.profileObj) //Data Of the User logged in
}
```


that's it you have successfully created an clint side google auth now you can use the data to store it into your backend and use it like normal `JWT` authentication.
 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pcfuxz6cvo0kmrwq4cko.gif)
Sikh community profiles go with matrimonial platforms to find a perfect one

Tags: webdev, management
Published: 2022-02-16 10:46:31

There are lots of Matrimonial site who works for Sikh community but [TruelyMarry.com](https://www.truelymarry.com/) is one of the best Indian Matrimonial services  who also work for communities and they has also work for sikh community and their sikh portal who is known as Sikh matrimonial and they have team of expert matchmakers who help you to find your partner 

There are lots of matchmaking site who works for the Sikh Community but they didn’t provide good services because they didn’t have expert matchmaking team they all are online matchmaking services and they use online  software for matchmaking but TruelyMarry is only one matrimonial who provide personalized matchmaking service that's the reason families bring us no 1 matchmaking service provider 

[Sikh Matrimonial site](https://www.truelymarry.com/matrimony/sikh-matrimonial) offers free registration and free search to find your desired partner.Sikh Matrimony with its decade of experience in the field offers a wide array of easy to use services like matrimonial marriage proposal advertisement, free as well as ads of paid membership to help you meet your prospective life partner. We have many registered profiles of Sikh bride and groom on our Matrimonial site. It is FREE to register and start contacting other members from Matrimonial in India. To avoid misuse, fraud and any unauthorized access, Choose our Matrimonial site.In our Indian marriage site you can find genuine and verified profiles User find us most trusted and  Best Matchmaking service provider so, it’s your chance to us and give us opportunity to find your desired partner our [sikh matrimony site](https://www.truelymarry.com/matrimony/sikh-matrimonial) is created to help the profiles that they can find their partner easily. 
If you are a Sikh and belong to a nuclear family with parents who are settled abroad and have done their studies in foreign and looking for the NRI profiles so, that online matrimonial portal for you and this is offer for you so, grab this valentine week offer and fin the profile which are you seeking from
Wednesday Links - Edition 2022-02-16
Tags: java, jvm, logging, spring
Published: 2022-02-16 10:46:14

JEP 423: Region Pinning for G1 (6 min)🎯
https://openjdk.java.net/jeps/423

A decade of major cache incidents at Twitter (35 min)🏹
https://danluu.com/cache-incidents/

Beware of the order of operands in some Kotlin Collection operations (5 min)✖️
https://arkadiuszchmura.com/posts/beware-of-the-order-of-operands-in-some-kotlin-collection-operations/

Java records & compact constructors (4 min)⏺️
https://mikemybytes.com/2022/02/16/java-records-and-compact-constructors/

How to generate a random password in Groovy? (1 min)🔣
https://e.printstacktrace.blog/how-to-generate-random-password-in-groovy/

Logging with System.Logger (30 sec)🪵
https://twitter.com/piotr_minkowski/status/1493250223367458821

System Logger, again (3 min)🪵
https://blog.frankel.ch/system-logger/

Include diagrams in your Markdown files with Mermaid (2 min)🧜‍♀️
https://github.blog/2022-02-14-include-diagrams-markdown-files-mermaid/

Spring Tips: IO, IO, It's Off to Work We Go (47 min)↔️
https://www.youtube.com/watch?v=eKfNoT07k_s

JCStress Workshop (3h)😡
https://www.youtube.com/watch?v=koU38cczBy8
https://www.youtube.com/watch?v=iTZNhknTGrg
Installing AWS CLI on Apple silicon
Tags: aws, beginners, cloud, tutorial
Published: 2022-02-16 10:45:26

You’ve just received you’re shiny new Mac with an Apple silicon processor – like the M1 – and would like to install the AWS CLI. As usual, you download the latest GUI installer from AWS but it prompts for Rosetta. Does this mean that the latest version only supports Intel processors? 🤔

![Not eligible for installation](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g3c3deuai3byr96wfho1.png)

Apple made the transition from Intel to Mac relatively easy for end-users. Rosetta 2 does a wonderful job for applications compiled exclusively for x86-64-based processors to be translated for execution on Apple silicon. Since Apple silicon has been out for a while many developers provide Apple silicon compiled binaries. In fact, there are fewer major companies that don’t provide an Apple silicon version of their app. This is why some people, including myself – never install Rosetta. In this way, I can guarantee that all my apps are optimized for the new processor.

The [AWS documentation](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html) says that there are three ways to install the CLI on the Mac:

- GUI Installer
- Command line installer – All users
- Command line – Current user

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

The sad news is that all of these methods use the same macOS pkg file. This installer in this file is not yet optimized for Apple silicon but the included binaries are. This means that you have to install Rosetta just to install an Apple silicon app. Strange, indeed. 🙃 Thankfully there’s another solution that the official documentation doesn’t mention, Brew.

[Homebrew](https://brew.sh/) is the missing package manager for macOS. You probably already use it if you would like to install apps like wget or mc. Installation is simple and straightforward, just run the following command in your terminal.

`/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"`

Next run these two commands to add Brew to your PATH:

`echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"`

The only downside I see with Brew is it sends data to Google. It does warn you about this but doesn’t tell you how to turn it off. While Homebrew maintainers say these analytics help them decide on future features and prioritize current work – and recommends them to keep it on – I am still not a fan of personal data collection, even if it’s anonymous. To turn this off simply run the following command:

`brew analytics off`

Now that Brew is installed you can easily install the AWS CLI by executing the following command:

`brew install awscli`

Voilà, the AWS CLI is now installed without Rosetta. 🤘

⚠️ I should note that this workaround was needed at the time of writing this article and AWS will probably fix the installer, but until then just use Brew.
Relative and Absolute Paths
Published: 2022-02-16 10:44:54

### WHAT ARE PATHS

A path is a slash-separated list of directory names followed by either a directory name or a file name. Paths are similar to directories, a directory refers to a folder on a computer which has relationship with other folders within and around it.
A path can be classified into Relative paths and Absolute paths.

**RELATIVE PATHS**
As the name suggests, it is a path relative to the current working directory. Relative paths make use of some special symbols (. and ..) which refer to the current directory and the parent directory. Since directories are hierarchical these symbols are used in moving up in the hierarchy.
One major drawback of relative paths is, for instances where we want to move a document or file, we'll have to move the referenced data too


**ABSOLUTE PATHS**
An Absolute Path is a full path specifying the location of a file or directory, The specialty of this pathway is that it begins from the root directory and leads to the locations i.e it is specified from the root directory or the start of the filesystem.

Below is an example to illustrate how relative and absolute paths work.

 >- C:
     - Desktop
     - Scripts
 	- NewFolder
 	     - name.txt
 	- maindistro
     - Files
    
In this case C: is the root directory, considering a case where we're working from  the "Scripts" folder and we want to access the name.txt file, the relative path would be `./NewFolder/name.txt`, but the absolute path would start from the root directory which is `C:` so it'll be `C:/Scripts/NewFolder/name.txt`