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
<!DOCTYPE html> | |
<html> | |
<meta charset="utf-8"> | |
<head> | |
<title>Line generator</title> | |
<script type="text/x-mathjax-config"> | |
MathJax.Hub.Config({ | |
tex2jax: { | |
inlineMath: [ ['$','$'], ['\\(','\\)'] ], | |
processEscapes: true |
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
<!DOCTYPE html><html lang="en"> <head> <meta charset="utf-8"> <title>D3 Page Template</title> <script type="text/javascript" src="d3/d3.js"></script> | |
<style type="text/css"> | |
circle:hover { fill: orange; } </style> </head> <body><div> <svg width="500" height="500" style = "background-color : springgreen" id = "xaxis"></svg><svg width="500" height="500" style = "background-color : white" id = "main1"></svg></div> | |
<div><svg width="500" height="500" style = "background-color : white" id = "main2"></svg><svg width="500" height="500" style = "background-color : lightblue" id = "yaxis"></svg></div> | |
<p id="output">ccc</p> | |
<script> | |
var svg = d3.select("svg#main1"), width = +svg.attr("width"), height = +svg.attr("height"), radius = 32;var svg2 = d3.select("svg#main2"), width = +svg.attr("width"), height = +svg.attr("height"), radius = 32; | |
var svgX = d3.select("svg#xaxis"), width = +svg.attr("width"), height = + |
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
<!DOCTYPE html><html lang="en"> <head> <meta charset="utf-8"> <title>D3 Page Template</title> <script type="text/javascript" src="d3/d3.js"></script> | |
<style type="text/css"> | |
circle:hover { fill: orange; } </style> </head> <body><div> <svg width="500" height="500" style = "background-color : springgreen" id = "xaxis"></svg><svg width="500" height="500" style = "background-color : white" id = "main1"></svg></div> | |
<div><svg width="500" height="500" style = "background-color : white" id = "main2"></svg><svg width="500" height="500" style = "background-color : lightblue" id = "yaxis"></svg></div> | |
<p id="output">ccc</p> | |
<script> | |
var svg = d3.select("svg#main1"), width = +svg.attr("width"), height = +svg.attr("height"), radius = 32;var svg2 = d3.select("svg#main2"), width = +svg.attr("width"), height = +svg.attr("height"), radius = 32; | |
var svgX = d3.select("svg#xaxis"), width = +svg.attr("width"), height = + |
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
class Component: | |
def __init__(self, p, s): | |
self.size = 0 | |
self.power = p | |
self.status = s | |
class Engine(Component): | |
def __init__(self, p, s, a): | |
super().__init__(p, s) |
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
# Implementation based on @Ceyron's Numpy version: | |
# https://github.com/Ceyron/machine-learning-and-simulation/blob/main/english/simulation_scripts/lid_driven_cavity_python_simple.py | |
# Make sure you have Taichi installed: | |
# pip install -U taichi | |
import taichi as ti | |
real = ti.f32 | |
ti.init(default_fp=real, arch=ti.cpu) # you can switch to ti.gpu if you have one | |
N_POINTS = 41 |