Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import streamlit as st | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from scipy.integrate import odeint | |
def drag_coefficient(Re): | |
"""Calculate the drag coefficient using the empirical correlation.""" | |
if Re < 1: | |
return 24 / Re | |
elif Re < 1000: |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
% \embedvideo{<poster or text>}{<video file (MP4+H264)>} | |
% \embedvideo*{...}{...} % auto-play | |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
\usepackage[bigfiles]{pdfbase} | |
\ExplSyntaxOn | |
\NewDocumentCommand\embedvideo{smm}{ | |
\group_begin: | |
\leavevmode |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import napari | |
import numpy as np | |
import matplotlib.pyplot as pl | |
import h5py | |
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas | |
from matplotlib.figure import Figure | |
#from qtpy.QtWidgets import QApplication, QMainWindow, QPushButton, QMenu, QVBoxLayout, QSizePolicy, QMessageBox, QWidget, QPushButton | |
import pyqtgraph as pg | |
from pyqtgraph.Qt import QtGui, QtCore | |
import sys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import streamlit as st | |
# streamlit preparation | |
st.title('Four dependent sliders') | |
# Session state callbacks | |
def callback_x1(): | |
"""The callback renormalizes the values that were not updated.""" | |
# Here, if we modify X1, we calculate the remaining value for normalisation of X2, X3 and X4 | |
remain = 100 - st.session_state.x1 |
NewerOlder