⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 piper_plugin.py

📁 这是一个支持向量机的代码
💻 PY
字号:
from util import GetInputfrom common_interface import Fileimport util,tempfileplugin_name  = "General Command"def create(callback):    command = GetInput(question='Command:')    if not command: return None    return Piper(command,callback)class Piper:    input_description = [('input', File)]    output_description = [('output', None)]    def __init__(self,command,callback):        self.command = command        self.callback = callback    def configure(self):        command = GetInput(question='Command:',default=self.command)        if command:             self.command = command            return True    def run(self,input):        filename = tempfile.mktemp()        f = open(filename,'wb')        cmd = self.command        if input: cmd += '< %s' % input.pathname        util.run_command(cmd, f.write, self.callback.log)        f.close()        return {'output': File(filename)}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -