Lecture 2: Data in Linguistics, Git/GitHub, Jupyter Notebook. LING 1340/2340: Data Science for Linguists Na-Rae Han

Similar documents
Lecture 3: Processing Language Data, Git/GitHub. LING 1340/2340: Data Science for Linguists Na-Rae Han

Lecture 6: more pandas (and git/github) LING 1340/2340: Data Science for Linguists Na-Rae Han

Getting the files for the first time...2. Making Changes, Commiting them and Pull Requests:...5. Update your repository from the upstream master...

How to version control like a pro: a roadmap to your reproducible & collaborative research

Agenda. - Final Project Info. - All things Git. - Make sure to come to lab for Python next week

Lab 01 How to Survive & Introduction to Git. Web Programming DataLab, CS, NTHU

Software Development I

Git & Github Fundamental by Rajesh Kumar.

Tutorial 2 GitHub Tutorial

Tips on how to set up a GitHub account:

Lab 08. Command Line and Git

L Modeling and Simulating Social Systems with MATLAB

Working in Teams CS 520 Theory and Practice of Software Engineering Fall 2018

Online Remote Repositories

Revision Control. How can 4. Slides #4 CMPT 276 Dr. B. Fraser. Local Topology Simplified. Git Basics. Revision Control:

Human-Computer Interaction Design

Human-Computer Interaction Design

Using GitHub to Share with SparkFun a

Introduction to Git and GitHub for Writers Workbook February 23, 2019 Peter Gruenbaum

Lab Objective. Lab Assignment. Downloads and Installation

Intro to Github. Jessica Young

Version control. what is version control? setting up Git simple command-line usage Git basics

Version Control with Git ME 461 Fall 2018

Version Control with Git

git and the virtue of version control ECE /2/2015

Git. Charles J. Geyer School of Statistics University of Minnesota. Stat 8054 Lecture Notes

CS 520: VCS and Git. Intermediate Topics Ben Kushigian

Visualizing Git Workflows. A visual guide to 539 workflows

How to be a 1337 h4ck3r: Git + Linux

Effective Software Development and Version Control

Warmup. A programmer s wife tells him, Would you mind going to the store and picking up a loaf of bread? Also, if they have eggs, get a dozen.

LSST software stack and deployment on other architectures. William O Mullane for Andy Connolly with material from Owen Boberg

API RI. Application Programming Interface Reference Implementation. Policies and Procedures Discussion

Windows. Everywhere else

How to git with proper etiquette

Lab Exercise Git: A distributed version control system


AMath 483/583 Lecture 2. Notes: Notes: Homework #1. Class Virtual Machine. Notes: Outline:

AMath 483/583 Lecture 2

1. Which of these Git client commands creates a copy of the repository and a working directory in the client s workspace. (Choose one.

Eugene, Niko, Matt, and Oliver

git commit --amend git rebase <base> git reflog git checkout -b Create and check out a new branch named <branch>. Drop the -b

Working with GIT. Florido Paganelli Lund University MNXB Florido Paganelli MNXB Working with git 1/47

213/513/613 Linux/Git Bootcamp. Cyrus, Eugene, Minji, Niko

Version control system (VCS)

F17 Modern Version Control with Git. Aaron Perley

Version control. with git and GitHub. Karl Broman. Biostatistics & Medical Informatics, UW Madison

Version Control for Fun and Profit

Git and GitHub. Dan Wysocki. February 12, Dan Wysocki Git and GitHub February 12, / 48

Setting up GitHub Version Control with Qt Creator*

699DR git/github Tutorial

Chapter 5. Version Control: Git

Version Control. Software Carpentry Github s Hello World Git For Ages 4 And Up You need source code control now

2 Initialize a git repository on your machine, add a README file, commit and push

S18 Modern Version Control with Git

Version Control Systems (Part 1)

Git. Presenter: Haotao (Eric) Lai Contact:

Hg Tutorial. For : COP Object oriented Programming (Using C++) Biswas Parajuli

A L A TEX-oriented intro to Git

Overview. 1. Install git and create a Github account 2. What is git? 3. How does git work? 4. What is GitHub? 5. Quick example using git and GitHub

Version Control. Version Control

CSCE UVM Hands-on Session-1 Pre-Work

GETTING STARTED WITH. Michael Lessard Senior Solutions Architect June 2017

Version control with Git.

Salvatore Rinzivillo VISUAL ANALYTICS

School of Computing Science Gitlab Platform - User Notes

Git Introduction CS 400. February 11, 2018

Lecture 12: Shell Scripting, SSH, Super-Computing. LING 1340/2340: Data Science for Linguists Na-Rae Han

Using Git to Manage Source RTL

Intro to Linux & Command Line

Git Guide. Meher Krishna Patel. Created on : Octorber, 2017 Last updated : October, More documents are freely available at PythonDSP

Git better. Collaborative project management using Git and GitHub. Matteo Sostero March 13, Sant Anna School of Advanced Studies

Recap: Developer's Environment

Git GitHub & secrets

G E T T I N G S TA R T E D W I T H G I T

The Old World. Have you ever had to collaborate on a project by

KTH Royal Institute of Technology SEMINAR 2-29 March Simone Stefani -

LAB 0: LINUX COMMAND LINE AND SVN

Submitting your Work using GIT

Midterm Next Week. Last year s midterm (which didn t include remotes):

Introduction to Git and Github

b. Developing multiple versions of a software project in parallel

FEEG Applied Programming 3 - Version Control and Git II

Git Tutorial. André Sailer. ILD Technical Meeting April 24, 2017 CERN-EP-LCD. ILD Technical Meeting, Apr 24, 2017 A. Sailer: Git Tutorial 1/36

Git for Newbies. ComMouse Dongyue Studio

Software Engineering

Getting started with GitHub

CSE 391 Lecture 9. Version control with Git

Object Oriented Programming. Week 1 Part 2 Git and egit

From Commits to Collaboration: A Git Tutorial for Social Scientists

Git Setup Help using GitKraken (CSE 154)

Version Control Systems: Overview

Lecture 01 - Working with Linux Servers and Git

CESSDA Expert Seminar 13 & 14 September 2016 Prague, Czech Republic

Tizen/Artik IoT Practice Part 4 Open Source Development

Using Git and GitLab: Your first steps. Maurício

SECTION 2: HW3 Setup.

Esri on GitHub: How to Participate in Open Source Projects

A Brief Introduction to Git. Sylverie Herbert (based on slides by Hautahi Kingi)

Section 1: Tools. Kaifei Chen, Luca Zuccarini. January 23, Make Motivation How... 2

Transcription:

Lecture 2: Data in Linguistics, Git/GitHub, Jupyter Notebook LING 1340/2340: Data Science for Linguists Na-Rae Han

Objectives What do linguistic data look like? Tools: You should be taking NOTES! Git and GitHub Jupyter Notebook DataCamp tutorials 8/30/2017 2

First thing to do every class 1. Open up a Terminal/Git Bash window ("shell" window). 2. Move into your Data_Science directory. cd Documents/Data_Science 3. Make sure you are in the right directory. Hit TAB for autocompletion. pwd "Print Working Directory" 4. Look at what's inside the directory. ls or ls -la ls for "list directory". -la for "long/all". Shows all hidden files in long output. 8/30/2017 3

8/30/2017 4

Your text editor in shell You should be able to launch your text editor from shell and create a new text file in the directory. Atom launches in a new window. I type some stuff in and save file. New file has been created. 8/30/2017 5

Mac users: configure Atom for shell https://stackoverflow.com/questions/22390709/how-toopen-atom-editor-from-command-line-in-os-x "Install Shell Commands" After this, you can launch atom directly from your Terminal (bash shell). 8/30/2017 6

Git What is Git? One of the most popular version control systems in the coding community. Software Carpentry's tutorial: http://swcarpentry.github.io/git-novice/ In this class, we will exclusively use the command line interface of git. Ignore the GUI clients. Likewise, do NOT install/use GitHub Desktop. 8/29/2017 7

Configuring your Git SW Carpentry's 2. Setting Up Git Mac users: open up a Terminal. Windows users: open up a Git Bash terminal. Display current configuration: git config --list We will configure: Your name Your email (use Pitt email!) Your editor (anything other than vim!) 8/30/2017 8

Your first local repository Follow steps in SW Carpentry's 3. Creating a Repository: 1. Create a directory called planets 2. Initiate it as a git repository git init 3. Create a new text file 'mars.txt' 4. Add files to be committed git add mars.txt 5. Commit file git commit -m 'first commit' 6. Edit the text file 7. Add files to be committed git add mars.txt 8. Commit file git commit -m 'changed x, y, z' Check status between steps: git status 8/29/2017 9

Your first local repository Your directory planets was set up with a git repository. planets is now: tracked by git all changes will be documented able to revert back to earlier version, if needs be commit But is this all? How about backup? collaboration? social? 8/29/2017 10

GitHub: a remote repository This is where GitHub comes in. GitHub is a repository hosting service. A website where you can keep a copy of your Git repository. REMOTE repository on GitHub, LOCAL repository on your laptop. push pull commit 8/29/2017 11

GitHub: a social, remote repository GitHub also works as a central remote repository among a group of collaborators working on a shared project. Everyone works on their own local copy of the repository, making changes. git is able to keep track and merge changes submitted by everyone. 8/31/2017 12

Creating a GitHub repo There are TWO main methods of initiating a GitHub repo. Method 1: You have an existing LOCAL git repo on your laptop, and you link that up ("push") to GitHub's remote repo. SW Carpentry's 7. Remotes in GitHub goes this route. We could push our planets git repo to a GitHub repo this way. Method 2: You start from scratch. Create a whole new repository on GitHub, and then clone it onto your laptop as a brand-new local repository. This YouTube tutorial shows you how. Let's try this. 8/30/2017 13

Your first GitHub repo On GitHub, create a new repository called "practice-repo". Provide a short description. Keep it public. Initialize it with a README. 8/30/2017 14

Cloning first GitHub repo GitHub shows a URL to use in cloning. Copy to clipboard. In Terminal/Git Bash, move into your Data_Science directory (cd Documents/Data_Science), then execute: git clone https://github.com/yourid/practice-repo.git practice-repo directory is cloned as a local repository. 8/30/2017 15

Local repository remote repository After committing, we now need to push to remote repo. 1. Create a new text file 'notes.txt' 2. Add files to be committed git add notes.txt 3. Commit file git commit -m 'first commit' 4. Push change to GitHub: git push 5. Edit the text file 6. Add files to be committed git add notes.txt 7. Commit file git commit -m 'changed x, y, z' 8. Push change to GitHub: git push Check status between steps: git status Push change to GitHub: git push 8/30/2017 16

Forking When you start with someone else's project. https://help.github.com/articles/fork-a-repo/ You fork the original repo into your own account, creating your own "fork". You make changes in your own fork. Original repo is not affected. pull request: When you think the original project could benefit from your contribution, you ask the owner to "pull" from your fork. Owner of original ("upstream") will review your contribution, and then either merge it or reject it. 8/31/2017 17

Your first fork Go to narae's GitHub profile. Fork "Class-Practice-Repo". You will now have the exact same content in your own account. Clone your fork onto your local machine, via git clone. Copy over your To-Do1 submission file into todo1/ directory. Make sure the file name has your name in it. Commit, and then push to your fork. Confirm your GitHub fork now has your submission file. Create a merge request for Na-Rae. 8/31/2017 18

Up-close with linguistic data Activity 30 minutes 1. Everyone download this zipped archive: http://www.pitt.edu/~naraehan/ling1340/real_linguistics_data.zip 2. There are two data sets; one requires downloading from source. Explore and discuss: Discussion points next slide 3. Team lead is in charge of submitting the info above. Inside activity1/ folder, created and edit report_teamcolor.txt Push change to your own fork, and then issue a pull request. Na-Rae will then merge the changes into the upstream (original) repo. 4. Finally, everyone sync their own local fork. 8/31/2017 19

Up-close with linguistic data Activity 30 minutes Discussion points: What kind of data set is this? Content? Format? Purpose? How was the data created, collected, and processed? How did the researcher organize the data? At present, what can you do with this data? After learning data-science methods, what do you think you will be able to do with the data? 8/31/2017 20

Wrapping up Homework #1 is out: due on Tuesday. Office hours Mon/Wed 2:30 -- 4pm. G17 CL Also by appointment Make sure you joined DataCamp group. I'll also be sending GitHub Organization invitation. Start learning: Git, GitHub Jupyter Notebook numpy 8/31/2017 21