GithubHelp home page GithubHelp logo

engy502's Introduction

ENGY502

Example and homework problem involving fastsim.

Installing Needed Software

Code Editor

The example code should be able to run in any major code editing software (e.g. Visual Studio Code, Spyder, PyCharm), but NREL recommends Visual Studio Code (VS Code). Install VS Code, and optionally add the following recommended plugins:

Python Installation

You can install Python in either of two ways:

  • Anaconda Python Distribution or Miniconda -- Anaconda/Miniconda seems to work better on Windows. This will likely install Python 3.12, but that's ok -- when you create the Anaconda virtual environment, it will be Python 3.10.
  • Python 3.10 -- this works pretty well on Mac. For Mac or Windows, click the link to obtain an appropriate installer. For Mac, if you have Homebrew, you can instead use brew install python3.10. For linux, run sudo apt install python3.10, sudo dnf install python3.10, or whatever works for your linux distribution.

Setting up your local environment

  1. Place the project folder containing this readme anywhere you like (e.g. c:\Users\<your username>\Documents\ENGY502\fastsim-hw\)
  2. Within the project folder you created above, create and activate a python enviroment (make sure to be consistent with the method you used to install python above):
    • Anaconda
      1. Open Anaconda Powershell Prompt or your Mac/linux terminal and run conda create --name=engy502-env python=3.10
      2. Activate the environment: conda activate engy502-env
      3. Install the dependencies: pip install -r requirements.txt
      4. After finishing this assigment, you can delete the environment with conda env remove --name engy502-env from within the same folder
    • Python3.10
      1. Open your preferred terminal environment, and run python3.10 -m venv engy502-env
      2. Run source engy502-env/bin/activate (may differ on Windows) to activate the enviroment
      3. Install dependencies: pip install -r requirements.txt
      4. After finishing this assignment, run rm -rf engy502-env to remove the enviroment

Running the example

Open VS Code in the project folder (whatever folder you created in step one of Setting up your local environment). Open example.py as a VS Code tab. Click on the first line, and type <Ctrl>+<Shift>+P (<Cmd>+<Shift>+P on Mac) then type jupyter: run all cells to run all of the notebook cells (marked by # %%) in an interactive terminal.

engy502's People

Contributors

calbaker avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.