This file contains hidden or 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
1: def _generated_forward(i:int, k:int, _var_5305017088:torch.Tensor, _var_5305017136:torch.Tensor, _var_5305023376:torch.Tensor) -> tuple[torch.Tensor]: | |
2: sum_ = 0 # (i, k) | |
3: # Product of 2 tensors | |
4: var_x = _var_5305023376 # (i, j) | |
5: var_w = _var_5305017088 # (j, k) | |
6: # var_x: (i, j) | |
7: # var_w: (j, k) | |
8: prod_ = ctg.array_contract( | |
9: arrays=[var_x, var_w], | |
10: inputs=[('i', 'j'), ('j', 'k')], |
This file contains hidden or 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
1: def _generated_forward(i:int, k:int, _var_5305017088:torch.Tensor, _var_5305017136:torch.Tensor, _var_5305023376:torch.Tensor) -> tuple[torch.Tensor]: | |
2: sum_ = 0 # (i, k) | |
3: # Product of 2 tensors | |
4: var_x = _var_5305023376 # (i, j) | |
5: var_w = _var_5305017088 # (j, k) | |
6: # var_x: (i, j) | |
7: # var_w: (j, k) | |
8: prod_ = ctg.array_contract( | |
9: arrays=[var_x, var_w], | |
10: inputs=[('i', 'j'), ('j', 'k')], |
This file contains hidden or 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 numpy as np | |
from sklearn.linear_model import LinearRegression | |
# Generate some example data | |
np.random.seed(42) | |
n_samples = 100 | |
# Create synthetic features (x1: thickness, x2: stiffness, x3: scent, x4: another property) | |
X = np.random.rand(n_samples, 4) * 10 # Random values between 0 and 10 |
This file contains hidden or 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 numpy as np | |
import matplotlib.pyplot as plt | |
# Parameters | |
d = 5 | |
n = 5 | |
maxP = 10 | |
n_samples = 10000 | |
def formula_p1(n, d): |
This file contains hidden or 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 numpy as np | |
import matplotlib.pyplot as plt | |
# Parameters | |
d = 10 | |
maxP = 10 | |
n_samples = 100 | |
# Identity matrix | |
ii = np.eye(d) |
This file contains hidden or 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 asyncio | |
import asyncssh | |
import re | |
from nicegui import ui | |
# SSH connection details | |
SSH_HOST = 'remote_host' | |
SSH_PORT = 22 | |
SSH_USERNAME = 'username' | |
SSH_PASSWORD = 'password' |
This file contains hidden or 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
from manim import * | |
import numpy as np | |
class DualRingHeatTransferAnimation(Scene): | |
def construct(self): | |
# Configuration | |
num_blocks = 20 | |
num_around = 39 | |
block_size = 0.4 | |
outer_radius = 3.3 |
This file contains hidden or 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
from manim import * | |
import numpy as np | |
class DualRingHeatTransferAnimation(Scene): | |
def construct(self): | |
# Configuration | |
num_blocks = 20 | |
block_size = 0.4 | |
outer_radius = 3.3 | |
inner_radius = 2.9 |
This file contains hidden or 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
from manim import * | |
import numpy as np | |
class HeatTransferAnimation(Scene): | |
def construct(self): | |
# Configuration | |
num_blocks = 10 | |
block_size = 1 | |
spacing = 0.1 |
This file contains hidden or 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 geopandas as gpd | |
import matplotlib.pyplot as plt | |
import pandas as pd | |
import matplotlib.colors as mcolors | |
from shapely.geometry import Polygon, MultiPolygon | |
import shapely.ops | |
import os.path | |
def get_text_color(fill_color): |
NewerOlder