Open Akesari12 opened 4 years ago
@EastBayEv , @aculich, getting your eyes on these first two labs would be great! A lot of this is based on D-Lab's BashGit. Any comments/suggestions/corrections welcome. Here's the link: https://github.com/dlab-berkeley/Computational-Social-Science-Training-Program/tree/master/Reproducible%20Data%20Science
Also, if we could follow up about getting the students onboarded to benten or another remote server for the ssh part of the command line, that would be awesome.
@Akesari12 @EastBayEv continuing the conversation for now in Slack in #curriculum-development
We can use this github issue to document the final answer that we come to in the Slack conversation.
For now, try running the notebooks using this link for the campus datahub:
@Akesari12 I strongly recommend teaching using SSH protocol for git push
and pull
. It's quicker and safer way to use GitHub.
Step 1: Set up to connect to GitHub using SSH: https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh
Step 2: Type git remote set-url origin git@github.com:user/repo
in the command line.
No longer needs to type id and pw to push and pull.
@Akesari12 For the bash part, consider teaching writing and executing a sh
file.
an example
#!/bin/sh
#! part called shebang
blah blah
let's say you name the file test.sh
you can make it executable by
$ chmod +x test.sh
chmod
= change mode
+x is a file permission parameter and means executable
then you can execute the file by
$ ./test.sh
@Akesari12 For the bash, also consider teaching cat
, less
, and head
.
In the following examples, text means any kind of flat file like CSV, TXT, etc.
cat
: print a small text file (print everything)
less
: print a large text file (you need to enter to scroll down lines)
head
: print first n lines in a text file. head -n 1
print first 5 lines in a text file. Note that -n does not mean negative n - indicates a parameter will be followed.
I also use awk
, grep
, find
, and echo
a lot.
In-Class Lab for working with git and bash tools.