Coder Social home page Coder Social logo

xl-w / physicstutorials.jl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from juliaphysics/physicstutorials.jl

0.0 0.0 0.0 3.86 MB

A collection of physics tutorials for the Julia programming language

License: MIT License

Julia 0.95% CSS 0.87% HTML 35.60% Smarty 0.17% Jupyter Notebook 62.42%

physicstutorials.jl's Introduction

PhysicsTutorials.jl

This package holds tutorials showing how to utilize Julia and its ecosystem for physics applications. Tutorials are available as PDFs, HTML webpages, and interactive Jupyter notebooks. The folder structure is tutorials/<category>/<tutorial name>/. Each tutorial folder is a Julia project, which can be ] activated and ] instantiated. For more information, please consult the JuliaPhysics webpage, which also lists a bunch of external tutorials.

Table of Contents

Interactive Jupyter Notebooks

To run the tutorials interactively in Jupyter notebooks, install the package and IJulia via

] add http://github.com/JuliaPhysics/PhysicsTutorials IJulia

and start/open the notebook server like

using PhysicsTutorials, IJulia
PhysicsTutorials.open_notebooks()

Contributing

Supported source files for tutorials are Jupyter notebooks, Weave.jl files, or Literate.jl files. To contribute a tutorial, clone the repository and put the source file into tutorials/<category>/<tutorial_name>/ and name it <tutorial_name>.ipynb (extension .jmd/.jl for Weave/Literate sources). To trigger the generation process of all output formats, run the following code from within the repository root folder:

  1. Make sure you have Fire installed, if not, install it with ] add Fire,
  2. Create the source file tutorials/<category>/<tutorial_name>/<tutorial_name>.<extension>, where the extension should be either .ipynb, .jl, or .jmd.
  3. Type julia convert.jl tutorials/<category>/<tutorial_name>/<tutorial_name>.<extension> in a terminal.

Alternative approach: trigger conversion manually

using Pkg; Pkg.activate(".")
using PhysicsTutorials
PhysicsTutorials.convert_tutorial("<category>","<tutorial_name>", PhysicsTutorials.NotebookSource())

For Weave or Literate sources, replace PhysicsTutorials.NotebookSource() by PhysicsTutorials.WeaveSource() or PhysicsTutorials.LiterateSource(), respectively.

Title and Author Formatting

To have the title and author information of a tutorial formatted nicely, we special case the first two (non-empty) lines when parsing source files.

  • The first line should indicate the title information as a level 1 header, indicated by #.
  • The second line should specify the author information as a level 3 heading, i.e. ###.

Hence, for notebook and Weave input files (example) you want the first two lines to be

# My Awesome Tutorial
### John Doe

and for Literate input (see this example)

# # My Awesome Tutorial
# ### John Doe

physicstutorials.jl's People

Contributors

carstenbauer avatar giggleliu 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.