Session 1: Introduction
- The objective of this session is to teach you how to login to the lab computers, as well as how to navigate the terminal using simple Unix commands. You will also learn how to use Pycharm.
- Login to the lab computers.
- Introduction to Unix commands:
||Lists the contents of your current directory. A directory is similar to a file cabinet, it holds both folders and files.
||ls or ll
||Changes your directory.
||Prints your current directory
||Allows you to read the manual page for different commands.
||Copies a file and gives it the name of your choosing. Must use -r when copying directories.
||cp original.py copy.py
||mv filename.doc Documents
**Careful! This command deletes the file of your choosing. Once you use this command, the file is gone! There are no warnings.
||Makes a directory.
||Shows what is inside of a file. Press q to quit.
- Tips for using the Terminal:
Change your account password
- Open the terminal and type in the command: passwd
- Follow the instructions in the terminal. Note: Letters won't appear as you type your password.
Install the necessary software on the lab machines
- In the terminal, type in the following commands:
- pip3 install --user twython
- pip3 install --upgrade --user nltk
- pip3 install --user vaderSentiment
- ipython3 -i
- import nltk
- This will bring up a menu, navigate to the top right. Click on the blue colored tab titled “All Packages”. Scroll down to a file called “vader_lexicon” and download it. Once it is downloaded, exit the menu.
- In xfce, right click on the desktop background.
- Click “Create Launcher”
- Name: Pycharm
- Command: /usr/local/pycharm-community-2016.1.4/bin/pycharm.sh (You can copy and paste this)
- Click “Create”
- Click on “Pycharm” in your desktop, and when prompted, click “Launch Anyway”
- When prompted with a password, click cancel (may have to click cancel multuple times)
- When prompted with "JetBrains Private Policy" screen, click accept
- When prompted with "Complete Installation", press OK
- Give it a few moments!
- If the “Tip of the Day” window pops up, just click “Close”
- Follow your instructors directions past this point!
Creating a new Python Project
- Navigate to File -> New Project
- Select interpreter 3.7.3
- Select "Open in current window and "Add to currently opened projects"
- Press OK
- In the upper left corner, right click your new project
- Rename your project with Refactor -> Rename
- Add a new python file with New -> Python file
- To run your program, go to Run -> Run (Choose either option presented) and select your file
Congratulations! Session 1 is complete. Click here to return to the schedule.