Skip to content

matt-lourens/dev_env_basics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Work Environment

VS Code

A code editor. It's free, open source, and runs everywhere (even your Ipad).

Install

Source code

  • Really good IntelliSense
  • Debugging
  • Integrated version control (Git)
  • Highly customizable

Overview

Useful Commands

  • ctrl+shift+p -> Most useful, opens the command palette
  • ctrl+k, ctrl+s -> Keyboard shortcuts, away with the mouse!
  • ctrl+b -> Toggle Explorer
  • ctrl+` -> Toggle Terminal

Github Copilot

ChatGPT in your editor

Use cases

Coding

Isolate workspaces on a per-project basis

Template Project Structure:

  • project_name
    • .venv
    • .vscode
    • .gitignore
    • project_name
      • __init__.py
      • main.py
    • requirements.txt

Steps

  1. ctrl+shift+p -> Python: Create Environment

  2. ctrl+shift+` to open new terminal in .venv

  3. pip install -r requirements.txt

  4. Create repo online and initialize it locally

    echo "# project_name" >> README.md
    git init
    git add README.md
    git commit -m "first commit"
    git remote add origin git@github.com:username/project_name.git
    git push -u origin master

For management of different python environments use pyenv

Python Development

Extensions:

Remote development:

Capabilities:

CoPilot Example:

Code Generation:Function that gets the ground state of a given Hamiltonian H

  • Code generation Function that gets the ground state of a given Hamiltonian $H=\begin{bmatrix} 0 & 1 & 1 & 0\ 1 & 0 & 0 & -1\ 1 & 0 & 0 & -1\ 0 & -1 & -1 & 0 \end{bmatrix}$

    Use Scipy sparse matrix instead and return smallest eigenvalue based on real part

  • Code explanation Factorial Docstring Binomial: The latex for this function is

  • Relative Imports

  • Debugging

  • Version Control

  • Pair Coding ctrl+shift+p -> Live Share: Start Collaboration Session

Writing

Prompts

The derivative of the function $f(x)$ is the limit: The fundamental theorem of calculus connects derivatives and integrals

% 3 by 3 Matrix with alphabetic entries

% Hamiltonian from cong et al:

The parameters for our model significantly influence the performance and jsutifies the usefulness of the framework

Scroll bar Git track changes

Extension:

  • Latex Workshop

Note taking

Markdown is powerful

Extensions:

  • Code Spell Checker
  • Markdown+Math
  • markdownlint

Visualise vector addition:

Visualise projection:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published