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 typing import Iterable | |
| from build123d import * | |
| from OCP.BRepBuilderAPI import BRepBuilderAPI_Sewing | |
| from OCP.TopAbs import TopAbs_SHELL | |
| from OCP.TopoDS import TopoDS | |
| from ocp_vscode import Camera, set_defaults, show | |
| set_defaults(reset_camera=Camera.CENTER, helper_scale=5, axes=True, axes0=True) |
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
| """ | |
| Simple example demonstrating Gordon curve interpolation with build123d. | |
| """ | |
| # %% | |
| from build123d import * | |
| from ocp_vscode import show_all, show, Camera, set_defaults | |
| set_defaults(reset_camera=Camera.KEEP, helper_scale=5) | |
| # %% |
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
| /** @type {import('tailwindcss').Config} */ | |
| /********************************************************* | |
| * You need to first install "npm i utopia-core" | |
| * Then you will be able to use the following: | |
| * font-size: e.g. text-u-6, text-u-0, text-u--2 | |
| * spacing: e.g. w-u-3xl, w-u-m, w-u-3xs, w-u-s-l, w-u-500-600 | |
| * color: e.g. bg-pri-100, bg-pri-500 (bg-pri), bg-pri-900 | |
| * bg-sec-100, bg-sec-500 (bg-sec), bg-sec-900 | |
| ********************************************************/ |
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 { createPool } from 'mysql2/promise' | |
| import 'dotenv/config' | |
| const pool = createPool({ | |
| host: process.env.DB_HOST, | |
| user: process.env.DB_USER, | |
| password: process.env.DB_PASSWORD, | |
| database: process.env.DB_DATABASE, | |
| waitForConnections: true, | |
| connectionLimit: 5, |
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 mysql.connector | |
| cnx = mysql.connector.connect( | |
| host="HOST", | |
| port=3306, | |
| user="USERNAME", | |
| password="PASSWORD", | |
| database="DATABASE NAME", | |
| pool_name="mypool", |
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 { createPool } from 'mysql2/promise' | |
| import 'dotenv/config' | |
| const pool = createPool({ | |
| host: process.env.DB_HOST, | |
| user: process.env.DB_USER, | |
| password: process.env.DB_PASSWORD, | |
| database: process.env.DB_DATABASE, | |
| waitForConnections: true, | |
| connectionLimit: 5, |