2025 09 29 Week 1 - Session 4 TDS Sep 2025#
Duration: 1h 38m
Here’s an FAQ summary of the live tutorial:
Q1: What is the main focus of this session?
A1: This session is about setting up basic tools for data science, primarily for Mac OS and Linux users, especially those who might have struggled with initial setup. We’ll cover essential tools like VS Code, Homebrew, UV, LMM, and GitHub CLI, and touch upon their core functionalities.
Q2: Why is Mac OS treated similarly to Linux in this course?
A2: Mac OS is a Unix-space system, which means its underlying file structure and organization are very similar to Linux. For this course, all the packages, tools, and workflows we’ll be using assume a Linux-like environment. This is why Windows users were guided to install WSL (Windows Subsystem for Linux) in previous sessions. While Mac OS has minor variations, the core principles for these tools remain the same across Mac and Linux.
Q3: How should I install VS Code on Mac OS?
A3: First, download VS Code. Then, do not run it directly from your Downloads folder. Instead, drag the downloaded application file into your Applications folder. This is a crucial step for Mac OS, as running applications directly from Downloads can prevent proper updates and access to critical system functionalities later on.
Q4: How do I know if my Mac is Intel-based or Apple Silicon?
A4: If your Mac was manufactured in 2020 or later, it’s most likely an Apple Silicon-based computer. Macs manufactured before 2020 are typically Intel-based. I’ll be demonstrating on an Apple Silicon system, but the general setup steps are similar.
Q5: What are the benefits of using GitHub Education Pack with Copilot?
A5: GitHub Education Pack is extremely valuable. It grants you free access to Copilot Pro, which includes premium credits for advanced AI models like Claude, Gemini, and GPT. These credits are renewed every month, allowing you to use powerful AI assistance throughout your studies. The pack also offers many other valuable free resources for students.
Q6: How do I get and activate GitHub Education Pack and Copilot Pro?
A6: You can search Google for “GitHub Education Pack” and follow the instructions to apply, typically by providing proof of your student ID. Once you have the pack, you’ll need to go into your GitHub account settings (on the website, in the Education Pack section) and explicitly activate Copilot Pro for your account. This is an extra step that ensures you get the full benefits beyond a 30-day trial.
Q7: How do I connect Copilot in VS Code to my GitHub account?
A7: In VS Code, you’ll need to sign in to GitHub through the Copilot extension. Make sure to use the specific GitHub account that has your GitHub Education Pack activated, as that’s what grants you Copilot Pro access.
Q8: What is Homebrew and why should I use it on Mac OS?
A8: Homebrew is a de facto standard command-line package manager for Mac OS (similar to APT on Debian/Ubuntu Linux). It simplifies the process of installing and updating software packages directly from your terminal. While you can manually download some applications, Homebrew is essential for many command-line tools and automatically handles dependencies. This ensures your software has all necessary components and works correctly, avoiding issues common with manual installations.
Q9: How do I install Homebrew and ensure it works correctly?
A9: You can find the installation command on the Homebrew website. Copy and paste it into your terminal. The command uses sudo, which requires your Mac OS password because Homebrew installs packages that might modify system files. After installation, Homebrew will display “Next Steps” commands. Run these commands to add Homebrew to your system’s PATH. This allows you to execute Homebrew commands from any directory in your terminal. If the installation doesn’t prompt for a password or show output, it might be due to security software; check your system’s IT or security settings.
Q10: What is PATH in the context of the terminal?
A10: PATH is a system variable (think of it as a nickname) that tells your terminal where to look for executable commands. When you add Homebrew (or any other tool) to your PATH, it means you can run Homebrew commands from any folder in your terminal, without needing to specify the full path to the Homebrew executable. This is crucial for convenience and automation.
Q11: What is Pyenv and why is Python version management important?
A11: Pyenv is a Python version management tool. It allows you to install and switch between different Python versions for various projects. This is important because:
- Dependency Conflicts: The absolute latest Python version might break existing code or dependencies required by other packages.
- Deployment Stability: For deploying applications (a key aspect of this course), you want to tie your projects to specific, stable Python versions to ensure consistent behavior and prevent deployment failures. Pyenv helps you manage these different versions seamlessly, ensuring each project uses its designated Python environment without interfering with others.
Q12: What is UV and what are its advantages for project setup and package management?
A12: UV is a powerful, modern tool for managing Python projects and packages. It’s designed to automate much of the workflow previously done manually with tools like venv and pip.
- Automated Project Setup: When you use
uv initto start a new project, it automatically creates essential files like.gitignore,main.py,dependencies.txt, and crucially, initializes a Git repository and stages your files. - Integrated Package Management: UV simplifies adding and removing packages (e.g.,
uv add flask). It automatically creates and manages virtual environments, activates them, and installs all necessary dependencies in one command, which is far more efficient and robust than separatevenvandpipsteps. - Efficiency: UV is designed to be very fast and resource-efficient. Unlike
pip, which might create multiple copies of the same dependency in different virtual environments, UV is smarter, saving disk space and reducing overhead. - Automation for Intelligent Agents: This seamless automation is critical for building intelligent applications (AI agents) that can generate code, install dependencies, and manage their environments without your direct intervention. UV allows these agents to perform complex setup tasks with single, powerful commands.
Q13: Why is Git an important industry skill, and how does UV help with it?
A13: Git is an absolutely essential version control system in the tech industry; it’s used in virtually every development field. It allows you to track changes in your code, collaborate with others, and revert to previous versions. UV greatly simplifies Git integration by automatically initializing a Git repository (git init) and staging initial files when you create a new project with uv init.
Q14: How can I manage my GitHub repositories directly from the terminal using GitHub CLI?
A14: GitHub CLI (gh) allows you to interact with your GitHub repositories (the online platform) directly from your terminal. After installing it (brew install gh) and authenticating with gh auth login, you can:
- Create Repositories: Use
gh repo create <repo_name> --public --push --source=.to create a new public repository on GitHub and push your local project in a single command. - Other GitHub Actions: Perform various GitHub-specific tasks (like managing issues, pull requests, or GitHub Actions workflows) directly from your command line.
- This automation is crucial for modern development workflows and for intelligent agents.
Q15: How do I manage different Python versions globally or locally for projects using Pyenv?
A15: After installing Pyenv, you can control Python versions:
- Local Project Version: To set a specific Python version for your current project folder, navigate into the project directory and use
pyenv local 3.12.11(or your desired version). Pyenv will ensure that only this version is used within that folder. - Global Default Version: To change the default Python version used everywhere on your system (unless overridden by a local setting), use
pyenv global 3.12.11. - Any version outside a locally configured project will revert to the global setting. This flexibility is key for managing diverse projects.
Q16: How can I use LMM to interact with language models and manage API keys?
A16: LMM (Language Model Manager) is a tool that allows you to interact with various LLMs (Large Language Models) directly from your terminal.
- API Key Setup: You need an API key for the LLM service you want to use (e.g., OpenAI). After obtaining the key, set it up in LMM using
lmm keys set openai. - Custom Base URL (TDS Students): For TDS students, you might need to specify a custom base URL to access the LLM services, e.g.,
export OPENAI_API_BASE=https://llm.api.tds.ai. - Querying LLMs: You can then send queries like
lmm "What is 2+2?"orlmm "Write a small Python code for a Fast API application." - Model Selection & Cost Efficiency: LMM allows you to specify different models (e.g.,
lmm -m gpt5-nano "..."). Cheaper models likegpt5-nano(costing mere cents per million tokens) are highly efficient and capable, even outperforming some more expensive older models in certain tasks like reasoning. This is crucial for cost-effective development, especially with AI agents. - Multimodal Capabilities: LMM can also handle multimodal inputs, like transcribing audio files, by specifying appropriate tools and prompts.
Q17: What is the overall takeaway regarding these tools and intelligent agents?
A17: The key takeaway is the power of automation through Command Line Interface (CLI) tools like UV and GitHub CLI. While you can perform many tasks manually, these tools enable seamless, one-command workflows for:
- Project initialization and Git setup.
- Python version management.
- Dependency installation and virtual environments.
- Interacting with remote GitHub repositories.
- Leveraging LLMs for various tasks, including code generation and transcription. This integrated automation is critical for building intelligent agents that can perform complex development tasks (like writing code, fixing errors, and managing infrastructure) without your direct intervention, simply based on high-level instructions. UV and GitHub CLI are foundational components for achieving this level of automation.
