Run a server at some port.
Example:
nguyene.duckdns.org| void mainImage( out vec4 fragColor, in vec2 fragCoord ) | |
| { | |
| // Normalized pixel coordinates (from 0 to 1) | |
| vec2 res = vec2(10.0, 10.0); | |
| vec2 uv = fragCoord/res.xy; | |
| vec2 uvMouse = iMouse.xy/res.xy; | |
| // Calculate distance | |
| float uvMouseDistX = uvMouse.x - uv.x; | |
| float uvMouseDistY = uvMouse.y - uv.y; |
| import { createInterface } from "readline/promises"; | |
| import { | |
| S3Client, | |
| PutObjectCommand, | |
| CreateBucketCommand, | |
| DeleteObjectCommand, | |
| DeleteBucketCommand, | |
| paginateListObjectsV2, | |
| GetObjectCommand, |
| import fs from "fs"; | |
| import { NextApiRequest, NextApiResponse } from "next"; | |
| import path from "path"; | |
| type Data = { | |
| files: string[]; | |
| }; | |
| export default function handler( | |
| req: NextApiRequest, |
| from typing import Callable, Dict, List | |
| import tensorflow as tf | |
| from .consts import strategy | |
| with strategy.scope(): | |
| def diff_augment(x: tf.Tensor, | |
| policy: str = '', | |
| channels_first: bool = False) -> tf.Tensor: |
| function fit(x,y) | |
| x̄ = mean(x) | |
| ȳ = mean(y) | |
| # Calculation of fit parameters | |
| m = sum([(xi - x̄) * yi for (xi, yi) ∈ zip(x, y)]) / sum([(xi - x̄)^2 for xi ∈ x]) | |
| b = ȳ - m*x̄ | |
| # Calculation of standard error | |
| D = sum([(xi - x̄)^2 for xi ∈ x]) |