Giter Club home page Giter Club logo

petropy's Introduction

PetroPy

Python lessons for petrologists

Hi there,

I’m so glad there has been interest in learning Python! There is a steep learning curve, but it pays off. Once you learn a few key tricks, you’ll be well on your way.

For me, I was unable to learn code until I had a task I wanted to complete. In that vein, I’ve created a first lesson in python for absolute beginners aimed at petrologists. The lesson will show you how to code up Gordon’s 1998 H2O solubility model. Future lessons will expand on this. This is something I imagine you could all envision doing… taking equations and coding them up to add functionality. For example, if there is interest, future lessons will teach you how to throw a spreadsheet full of data at your code and have it calculate something for all of the samples at once.

INSTRUCTIONS

In addition to below instructions, I made a getting started video! You can find it in the github repository or on YouTube at https://youtu.be/KsD324sHPmM

The lessons are in the form of jupyter notebooks, which is just a fancy way of sharing code. So that you don’t have to install anything, I’ve set up a jupyter notebook server! Here’s what to do:

  1. Navigate to the github repository for this project

  2. Clone the repository or download the lessons you want

  3. IF you have jupyter notebook installed on your computer:

    a. Ensure you have python3 and numpy installed

    b. Open the jupyter notebook file (e.g., "Lesson1.ipynb")

  4. IF you don't have jupyter notebook installed on your computer:

    a. Email the developer at [email protected] to request a login to the PetroPy server

    b. Once you have your user name, open a browser and go to http://142.93.195.231/

    c. Log into the server, and create a password. The password can be whatever you want! I won’t be able to see what it is, and I don’t know how to reset it if you forget it, so write it down somewhere.

    d. Drag and drop your files into the jupyter hub. Click the UPLOAD button that appears next to each file name.

    e. Open the Lesson 1 file.

  5. Learn python!

USING JUPYTER NOTEBOOKS

Notebooks are easy to use. I’ve written instructions at the top of the Lesson 1 file. Simply click on any cell you want to interact with, or just press Shift+Enter on your keyboard to move through cells. Shift+Enter executes any cell you’re on. There are two kinds of cells: text and code. The text that appears there (and images), was written in markdown but shows to you as text. If you double click a text cell, it will display the markdown. Don’t panic. Just press Shift+Enter to execute that cell and display it once again as formatted text.

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.