Files
mixly3/boards/default_src/python_pyodide/index.js
RXXXBNUer fe343c67ff Pyodide里的Tensorflow目录
可以跑通基本的训练、使用模型过程
2025-10-04 11:24:10 +08:00

154 lines
3.9 KiB
JavaScript

import * as Blockly from 'blockly/core';
import './language/loader';
import { Profile } from 'mixly';
import {
PythonVariablesBlocks,
PythonControlBlocks,
PythonMathBlocks,
PythonTextBlocks,
PythonListsBlocks,
PythonDictsBlocks,
PythonLogicBlocks,
PythonStorageBlocks,
PythonProceduresBlocks,
PythonTupleBlocks,
PythonSetBlocks,
PythonHtmlBlocks,
PythonUtilityBlocks,
PythonVariablesGenerators,
PythonControlGenerators,
PythonMathGenerators,
PythonTextGenerators,
PythonListsGenerators,
PythonDictsGenerators,
PythonLogicGenerators,
PythonStorageGenerators,
PythonProceduresGenerators,
PythonTupleGenerators,
PythonSetGenerators,
PythonHtmlGenerators,
PythonUtilityGenerators,
Procedures,
Variables,
Python
} from '@mixly/python';
import {
PythonMixpyAIBlocks,
PythonMixpyAlgorithmBlocks,
PythonMixpyCommunicateBlocks,
PythonMixpyCVBlocks,
PythonMixpyDataBlocks,
PythonMixpyDatastructureBlocks,
PythonMixpyFactoryBlocks,
PythonMixpyHardwareBlocks,
PythonMixpyInoutBlocks,
PythonMixpyIOTBlocks,
PythonMixpyPinsBlocks,
PythonMixpySerialBlocks,
PythonMixpySKLearnBlocks,
PythonMixpySystemBlocks,
PythonMixpyTurtleBlocks,
PythonMixpyAIGenerators,
PythonMixpyAlgorithmGenerators,
PythonMixpyCommunicateGenerators,
PythonMixpyCVGenerators,
PythonMixpyDataGenerators,
PythonMixpyDatastructureGenerators,
PythonMixpyFactoryGenerators,
PythonMixpyHardwareGenerators,
PythonMixpyInoutGenerators,
PythonMixpyIOTGenerators,
PythonMixpyPinsGenerators,
PythonMixpySerialGenerators,
PythonMixpySKLearnGenerators,
PythonMixpySystemGenerators,
PythonMixpyTurtleGenerators
} from '@mixly/python-mixpy';
import {
PythonPyodideSKLearnBlocks,
PythonPyodideSKLearnGenerators,
PythonTensorflowBlocks,
PythonTensorflowGenerators
} from './';
import './others/loader';
import './css/color_mixpy_python_advance.css';
Object.assign(Blockly.Variables, Variables);
Object.assign(Blockly.Procedures, Procedures);
Blockly.Python = Python;
Blockly.generator = Python;
Profile.default = {};
Object.assign(
Blockly.Blocks,
PythonVariablesBlocks,
PythonControlBlocks,
PythonMathBlocks,
PythonTextBlocks,
PythonListsBlocks,
PythonDictsBlocks,
PythonLogicBlocks,
PythonStorageBlocks,
PythonProceduresBlocks,
PythonTupleBlocks,
PythonSetBlocks,
PythonHtmlBlocks,
PythonUtilityBlocks,
PythonMixpyAIBlocks,
PythonMixpyAlgorithmBlocks,
PythonMixpyCommunicateBlocks,
PythonMixpyCVBlocks,
PythonMixpyDataBlocks,
PythonMixpyDatastructureBlocks,
PythonMixpyFactoryBlocks,
PythonMixpyHardwareBlocks,
PythonMixpyInoutBlocks,
PythonMixpyIOTBlocks,
PythonMixpyPinsBlocks,
PythonMixpySerialBlocks,
PythonMixpySKLearnBlocks,
PythonMixpySystemBlocks,
PythonMixpyTurtleBlocks,
PythonPyodideSKLearnBlocks,
PythonTensorflowBlocks
);
Object.assign(
Blockly.Python.forBlock,
PythonVariablesGenerators,
PythonControlGenerators,
PythonMathGenerators,
PythonTextGenerators,
PythonListsGenerators,
PythonDictsGenerators,
PythonLogicGenerators,
PythonStorageGenerators,
PythonProceduresGenerators,
PythonTupleGenerators,
PythonSetGenerators,
PythonHtmlGenerators,
PythonUtilityGenerators,
PythonMixpyAIGenerators,
PythonMixpyAlgorithmGenerators,
PythonMixpyCommunicateGenerators,
PythonMixpyCVGenerators,
PythonMixpyDataGenerators,
PythonMixpyDatastructureGenerators,
PythonMixpyFactoryGenerators,
PythonMixpyHardwareGenerators,
PythonMixpyInoutGenerators,
PythonMixpyIOTGenerators,
PythonMixpyPinsGenerators,
PythonMixpySerialGenerators,
PythonMixpySKLearnGenerators,
PythonMixpySystemGenerators,
PythonMixpyTurtleGenerators,
PythonPyodideSKLearnGenerators,
PythonTensorflowGenerators
);