text stringlengths 1 843k ⌀ |
|---|
import reflex as rx
config = rx.Config(
app_name="Calculadora",
) |
import reflex as rx
class State(rx.State):
expression: str = ""
result: str = ""
def add_to_expression(self, value: str):
self.expression += value
def clear(self):
self.expression = ""
self.result = ""
def calculate(self):
try:
self.result = str(eval(s... |
null |
import reflex as rx
config = rx.Config(
app_name="pyama_web",
) |
import os
import numpy as np
import numba as nb
import scipy
import h5py
import skimage as sk
import cv2
import pandas as pd
import re
import math
# import matplotlib.pyplot as plt
import pathlib
import scipy.ndimage as smg
from nd2reader import ND2Reader
STRUCT3 = np.ones((3,3), dtype=np.bool_)
STRUCT5 = np.ones(... |
import cv2
import numpy as np
import tifffile
from io import BytesIO
import base64
from PIL import Image
def read_tiff(file_path, channel=0):
"""
Reads a TIFF file and returns the data as a numpy array.
"""
tif = tifffile.TiffFile(file_path)
tif_data = tif.asarray()[channel]
return tif_data
... |
from flask import Flask, render_template, request, redirect, url_for, jsonify
from src.pyama_web.backend.gui import CellViewer
import src.pyama_web.core.pyama_util as pyama_util
import os
class App:
def __init__(self):
self.app = Flask(__name__)
self.cell_viewer = None
def routes(self):
... |
import os
import re
import cv2
import h5py
import numpy as np
import pandas as pd
import plotly.graph_objs as go
from plotly.subplots import make_subplots
from nd2reader import ND2Reader
import plotly.io as pio
from time import sleep
from io import BytesIO
import base64
from PIL import Image
import pathlib
import war... |
# %%
import src.pyama_web.core.pyama_util as pyama_util
import src.pyama_web.backend.gui as gui
AG_MOON = str(pyama_util.moonraedler_dir())
# %%
# Segment position(s)
# Path to ND2 File
nd2_path = AG_MOON + '/Judith/Students/Simon_Master/230505_TF73_HuH7.nd2'
# Output directory (will create a new folder per positio... |
"""Welcome to Reflex! This file outlines the steps to create a basic app."""
import reflex as rx
from rxconfig import config
class State(rx.State):
"""The app state."""
...
def index() -> rx.Component:
# Welcome Page (Index)
return rx.container(
rx.color_mode.button(position="top-right"),... |
null |
import reflex as rx
config = rx.Config(app_name="app") |
import reflex as rx
from app.state import ProjectileState
from app.components.input_form import input_form
from app.components.trajectory_plot import (
trajectory_plot_component,
)
from rxconfig import config
def index() -> rx.Component:
return rx.el.div(
rx.el.div(
rx.el.h1(
... |
import reflex as rx
import numpy as np
from typing import TypedDict, List as TypingList
class TrajectoryPoint(TypedDict):
x: float
y: float
class ProjectileState(rx.State):
initial_velocity: float = 20.0
launch_angle_deg: float = 45.0
initial_height: float = 0.0
gravity: float = 9.81
tim... |
null |
import reflex as rx
from app.state import ProjectileState
def input_form() -> rx.Component:
return rx.el.form(
rx.el.div(
rx.el.label(
"Initial Velocity (m/s):",
class_name="block text-sm font-medium text-gray-700",
),
rx.el.input(
... |
import reflex as rx
from app.state import ProjectileState
def trajectory_plot_component() -> rx.Component:
return rx.el.div(
rx.recharts.scatter_chart(
rx.recharts.cartesian_grid(
stroke_dasharray="3 3", stroke="#cccccc"
),
rx.recharts.x_axis(
... |
null |
import reflex as rx
config = rx.Config(
app_name="app1",
) |
End of preview. Expand in Data Studio
No dataset card yet
- Downloads last month
- 3