Skip to content

Commit

Permalink
Add random seed to ensure reproducibility
Browse files Browse the repository at this point in the history
  • Loading branch information
xhlulu committed Jan 29, 2021
1 parent 6621fa3 commit d2d83df
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions demos/pyvista-terrain-following-mesh/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

from dash_vtk.utils import presets

random.seed(42)


def toDropOption(name):
return {"label": name, "value": name}
Expand Down
2 changes: 2 additions & 0 deletions demos/slice-rendering/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

import vtk

random.seed(42)

# Data file path
demo_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
head_vti = os.path.join(demo_dir, "data", "head.vti")
Expand Down
2 changes: 2 additions & 0 deletions demos/synthetic-volume-rendering/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import dash_vtk
import dash_html_components as html

random.seed(42)

app = dash.Dash(__name__)
server = app.server

Expand Down
2 changes: 2 additions & 0 deletions demos/usage-algorithm/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
import dash_core_components as dcc
from dash.dependencies import Input, Output, State

random.seed(42)

app = dash.Dash(__name__, external_stylesheets=[dbc.themes.BOOTSTRAP])
server = app.server

Expand Down
2 changes: 2 additions & 0 deletions demos/usage-vtk-cfd/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

import vtk

random.seed(42)

# -----------------------------------------------------------------------------
# VTK Pipeline
# -----------------------------------------------------------------------------
Expand Down

0 comments on commit d2d83df

Please sign in to comment.