.chapter27<-function(i=0){ " i 27: GitHub and Git Mash software - -------------------- 1 Github: What is GitHub? 2 : Why useful 3 : Set up an account 4 : Search for you projects 5 : Download a zip file: Twitter Sentiment Analsysis 6 : stock prediction 7 : mortgage calculator 8 : Python Ganache and Crypto transactions 9 Git Bash: what is it? 10 : download Git Bash 11 : git clone (Twitter Sentiment Analsysis) 12 : Twitter Sentiment Analsysis 13 : stock prediction 14 : git push example [complete] 15 : git config 16 : commands 17 : session_state 18 : 2nd example 19 Videos 20 Links Example #1:> .c27 # get the above list Example #2:> .c27() # the same as the above Example #3:> .c27(1) # see the first explanation ";.zchapter27(i)} .n27chapter<-20 .zchapter27<-function(i){ if(i==0){ print(.c27) }else{ .printEachQ(27,i,.n27chapter) } } .c27<-.chapter27 .C27EXPLAIN1<-"What is GitHub? //////////////////////////////// GitHub is a web-based platform that provides tools and services for version control and collaboration on software development projects. It is one of the most popular and widely used platforms for managing and sharing source code. Here are some key aspects of GitHub: [see .c8(2) ] GitHub is not limited to just software development; it's also used for managing and collaborating on various types of text-based documents, data sets, and more. It has become an essential tool for many developers and teams working on software projects of all sizes and types. //////////////////////////////// " .C27EXPLAIN2<-"Why Github is quite uesful? //////////////////////////////// Version Control: GitHub uses Git, a distributed version control system, to track changes to source code. This allows developers to work on code collaboratively while keeping a history of all changes. It makes it easy to manage different versions of a project and merge contributions from multiple developers. Repositories: GitHub repositories, often referred to as \"repos,\" are containers for organizing and storing project files, including source code, documentation, and other assets. Each repository has a unique URL, making it easy to access and share. Collaboration: GitHub facilitates collaboration among developers and teams. Multiple people can work on the same project simultaneously, and GitHub provides tools for reviewing, commenting on, and merging code changes. This collaborative aspect is especially valuable for open-source projects. Issue Tracking: GitHub includes an issue tracking system that allows developers to report bugs, suggest new features, or discuss any aspect of a project. Issues can be assigned to specific team members, labeled, and tracked through their lifecycle. Pull Requests: Pull requests are a key feature of GitHub's collaborative workflow. They allow developers to propose changes to a repository's codebase. Other team members can review the proposed changes, discuss them, and then decide whether to merge them into the main codebase. GitHub Pages: GitHub Pages is a feature that enables users to create simple websites directly from their GitHub repositories. It's often used for hosting project documentation, blogs, or personal websites. Social Features: GitHub has a social aspect, with features like following other users, starring repositories, and forking repositories. Forking is a way to create a copy of someone else's repository to work on independently. Integration: GitHub integrates with a wide range of development tools and services, including continuous integration and continuous deployment (CI/CD) pipelines, code analysis tools, and project management tools. Security: GitHub provides features for access control, allowing repository owners to specify who can view, edit, or contribute to a project. It also offers security scanning and vulnerability alerts to help maintain code security. Community: GitHub has a large and active community of developers, making it a hub for open-source software development. Many open-source projects are hosted on GitHub, making it a central platform for discovering and contributing to a wide range of projects. //////////////////////////////// " .C27EXPLAIN3<-"Set up an account //////////////////////////////// Step 1: go to https://github.com Step 2: On the GitHub homepage, click \"Sign up\" STep 3: Choose a Plan: GitHub offers free and paid plans. For most users, the free plan (which includes unlimited public repositories) is sufficient. Select the \"Free\" plan and click the \"Continue\" button. Create Your Account: Fill out the registration form with the following information: Username: Choose a unique username for your GitHub account. This will be part of your GitHub profile URL (e.g., github.com/your-username). Email address: Provide a valid email address. You'll need to verify this email address. Password: Create a strong password for your GitHub account. //////////////////////////////// " .C27EXPLAIN4<-"Search for you projects //////////////////////////////// You can use a keyword or phrase to get some projects Step 1: go to https://github.com/ Step 2: //////////////////////////////// " .C27EXPLAIN5<-"Manually download a zip file:Twitter Sentiment Analsysis //////////////////////////////// Twitter Sentiment Analsysis Step 1: go to the following website https://github.com/abdulfatir/twitter-sentiment-analysis Step 2: click Code Step 3: choose 'Download Zip file' Step 4: unzipit //////////////////////////////// " .C27EXPLAIN6<-" //////////////////////////////// https://github.com/huseinzol05/Stock-Prediction-Models //////////////////////////////// " .C27EXPLAIN7<-" //////////////////////////////// https://github.com/paulyxy/mortgage_calculator //////////////////////////////// " .C27EXPLAIN8<-" //////////////////////////////// https://github.com/paulyxy/Python-Ganache-and-Crypto-transactions //////////////////////////////// " .C27EXPLAIN9<-"What is git? //////////////////////////////// Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. //////////////////////////////// " .C27EXPLAIN10<-"download git //////////////////////////////// https://git-scm.com/downloads https://git-scm.com/download/win https://git-scm.com/book/en/v2/Git-Basics-Getting-a-Git-Repository Documentation https://git-scm.com/doc https://git-scm.com/documentation https://git-scm.com/book/en/v2/Git-Basics-Getting-a-Git-Repository git help (git >t.txt) c:\\Users\\pyan\\AppData\\Local\\Programs\\Git\\bin\\git.exe version git version 2.39.0.windows.2 //////////////////////////////// " .C27EXPLAIN11<-"git clone //////////////////////////////// The most frequencly used command should be 'git clone location.git' Step 1: find an interested project on Github One example is https://github.com/paulyxy/blockchain-illustration-by-using-streamlit After clicking 'Code', the copy the link,shown below. https://github.com/paulyxy/blockchain-illustration-by-using-streamlit.git Step 2: launch 'Git Bash' for windows Step 2B: move to a location Step 3: issue the following code git clone https://github.com/paulyxy/blockchain-illustration-by-using-streamlit.git //////////////////////////////// " .C27EXPLAIN12<-"git clone [twitter-sentiment-analysis.git] //////////////////////////////// Twitter Sentiment Analsysis Step 1: go to the following website https://github.com/abdulfatir/twitter-sentiment-analysis Step 2: from the code drop down list copy the following one line https://github.com/abdulfatir/twitter-sentiment-analysis.git Step 3: lauch Git Bash --> move to your desired location Step 4: issue git clone https://github.com/abdulfatir/twitter-sentiment-analysis.git //////////////////////////////// " .C27EXPLAIN13<-"stock predition //////////////////////////////// https://github.com/huseinzol05/Stock-Prediction-Models https://github.com/huseinzol05/Stock-Prediction-Models.git //////////////////////////////// " .C27EXPLAIN14<-" git push example [complete] //////////////////////////////// Assume that the Git Bash is installed. Step 1: go to your desired subdirectory Step 2: righ-click your mouse -> choose 'Git Bash here' Step 3: git config --global user.name 'your name' git config --global user.email abc@gmail.com Step 4: git config --list Step 5: mkdir gitDemo -> cd gitDemo Step 6: mkdir firstRepo -> cd firstRepo Step 7: git init Step 8A: touch file1.txt -> notepad file1.txt -> [add something] Step 8B: git status Step 8C: git add . Step 8D: commit -m \"my 1st commit\" Step 8E: git log Step 9A: touch file2.txt -> notepad file2.txt -> [add something] Step 9B: git status Step 9C: git add . Step 9D: commit -m \"my 2nd commit\" Step 9E: git log Step 10: sign in to your account at https://github.com/ Step 12: add a new repository such as 'firstRepo' Step 13: copy and paste somthing like the following one git remote add origin http://github/paulyxy/firstRepo.git Step 14: git remote -v Step 15: git push -u origin master https://www.youtube.com/watch?v=QJ0iUNe27c8 //////////////////////////////// " .C27EXPLAIN15<-"git config //////////////////////////////// Configure your username and email --------------------------------- $git config --global user.name \"Paul Yan\" $git config --global user.email \"pyan@geneseo.edu\" Create your git repository repository ------------------------------- $git init project1 $cd project1 [create file1.txt] $git add file1.txt $git commit -m\"My first commit\" Version control video: ---------------------- https://git-scm.com/video/what-is-version-control //////////////////////////////// " .C27EXPLAIN16<-"Git commands //////////////////////////////// $git init myProject $cd myProject $git add . $git commit -m\"Importing all the code\" Collaborative mode (overlapping time and parallel work) ------------------------------------------------------- Doug and Mary doug $ git checkout master doug $ git commit -a -m\"My new logo\" doug $ git push mary $ git checkout -b marysfeature mary $ git commit -a -m\"My feature code\" mary $ git push origin marysfeature doug $ git pull doug $ git merge marysfeature Vidoe: https://git-scm.com/video/what-is-git //////////////////////////////// " .C27EXPLAIN17<-"session_state //////////////////////////////// The objective is to save time without rerun the whole code assume that we have a global varible number_of_obs=5 if 'number_of_obs' not in session_state: session_state['number_of_obs']=5 # or # session_state.number_of_obs=5 increment=st.button('show more rows ') if increment: st.session.number_of_obs +=1 decrement=st.button('show less rows ') if decrement: st.session.number_of_obs -=1 //////////////////////////////// " .C27EXPLAIN18<-"2nd example //////////////////////////////// Assume that the Git Bash is installed. Step 1: go to the subdirectory Step 2: righ-click your mouse -> choose 'Git Bash here' Step 3: git init ls -al Step 4: git status Step 5: add //////////////////////////////// " .C27EXPLAIN19<-"videos //////////////////////////////// Simplilearn,2020, Git Push Command | Git Bash Tutorial | Git Commands | Git Tutorial For Beginners | https://www.youtube.com/watch?v=QJ0iUNe27c8 Becoming a Data Scientist, 2020,How to Install Git Bash on Windows 10 https://www.youtube.com/watch?v=qdwWe9COT9k Steele,Colt, 2020,Learn Git In 15 Minutes https://www.youtube.com/watch?v=USjZcfj8yxE https://www.youtube.com/watch?v=iGutIN5t9Mo&t=88s //////////////////////////////// " .C27EXPLAIN20<-"Links /////////////////////////////////////////////// Downoad git to your computer https://git-scm.com/downloads https://git-scm.com/download/win Documentation https://git-scm.com/doc https://git-scm.com/documentation https://git-scm.com/book/en/v2/Git-Basics-Getting-a-Git-Repository git help (git >t.txt) c:\\Users\\pyan\\AppData\\Local\\Programs\\Git\\bin\\git.exe version git version 2.39.0.windows.2 /////////////////////////////////////////////// "