Basic HTML Structure
<!DOCTYPE html>
<html>
<head>
<title>title</title>
<meta> ... </meta>
<link> ... </link>| """Convert shapely geometries to other objects | |
| Other interfaces | |
| - matplotlib: PathPatch | |
| - pyqtgraph: PlotItem | |
| - bokeh: Glyph | |
| - scikit-image: Indices on a grid | |
| References |
| # Pytest | |
| def test_$NAME$(): | |
| assert True$END$ | |
| # Traitlets | |
| @default('$NAME$') | |
| def _default_$NAME$(self): | |
| return $END$ |
| """How to use line profiler [1]_ programatically. Code adapted from [2]_. | |
| .. [1] https://github.com/rkern/line_profiler | |
| .. [2] https://nvbn.github.io/2017/05/29/complexity/ | |
| """ | |
| from line_profiler import LineProfiler | |
| def main(*args, **kwargs): | |
| """Function to be profiled""" |
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| """ | |
| This file is execfile()d with the current directory set to its | |
| containing dir. | |
| Note that not all possible configuration values are present in this | |
| autogenerated file. | |
| All configuration values have a default; values that are commented out | |
| serve to show the default. | |
| requirements: |
| #!/usr/bin/env python | |
| from livereload import Server, shell | |
| package = "<package name>" | |
| server = Server() | |
| server.watch('docs/*.rst', shell('make html', cwd='docs')) | |
| server.watch('docs/**/*.rst', shell('make html', cwd='docs')) | |
| server.watch(f'{package}/**/*.py', shell('make html', cwd='docs')) | |
| server.watch(f'{package}/*.py', shell('make html', cwd='docs')) | |
| server.serve(root='docs/_build/html') |
| # Unicode characters and corresponding LaTeX math mode commands | |
| # ************************************************************* | |
| # | |
| # :Copyright: © 2011 Günter Milde | |
| # :Date: Last revised 2011-11-08 | |
| # :Licence: This work may be distributed and/or modified under the | |
| # conditions of the `LaTeX Project Public License`_, | |
| # either version 1.3 of this license or (at your option) | |
| # any later version. | |
| # |
| module ValueBasedDispatch | |
| export MyType, A, B, C, f | |
| abstract type MyType end | |
| struct A <: MyType end | |
| struct B <: MyType end | |
| struct C <: MyType end | |
| f(::Type{A}) = "Dispatch on argument A" |
| # You can choose a Julia release from https://julialang.org/downloads/ | |
| # Set URL for downloading Julia binaries | |
| JULIA_URL="https://julialang-s3.julialang.org/bin/linux/x64/1.6/julia-1.6.2-linux-x86_64.tar.gz" | |
| # Set name for the downloaded archive | |
| JULIA_ARCHIVE="~/julia.tar.gz" | |
| # Download the Julia language binaries | |
| curl -o ${JULIA_ARCHIVE} ${JULIA_URL} |