File: file.py

package info (click to toggle)
taskflow 3.9.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 45,948 kB
  • sloc: cpp: 39,058; xml: 35,572; python: 12,935; javascript: 1,732; makefile: 59; sh: 16
file content (25 lines) | stat: -rw-r--r-- 669 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
"""
`"Sphinx Gallery"-alike self-contained code file`_
--------------------------------------------------
"""

# Running sphx_glr_python_to_jupyter.py on this file will produce a ipynb
# version of the same (modulo bugs, which there's several of).

import math

#%%
# This is a reST markup explaining the following code, with the initial
# ``#<space>`` stripped, and on blank lines only the ``#`` stripped:
#
## However in this case both leading ``##`` will be kept.
#
# The ``math.sin()`` calculates a sin, *of course*, and the initial indentation
# of it is stripped also:
#

def foo():
# [yay-code]
    sin = math.sin(0.13587)
    two_sins = sin + sin
# [/yay-code]