1 Star 0 Fork 4

mingmao2021/disco-diffusion

forked from github/disco-diffusion 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
disco_utils.py 855 Bytes
一键复制 编辑 原始数据 按行查看 历史
Adam Letts 提交于 2022-07-01 17:27 . Adding disco_utils.py
import subprocess
from importlib import util as importlibutil
def module_exists(module_name):
return importlibutil.find_spec(module_name)
def gitclone(url, targetdir=None):
if targetdir:
res = subprocess.run(['git', 'clone', url, targetdir], stdout=subprocess.PIPE).stdout.decode('utf-8')
else:
res = subprocess.run(['git', 'clone', url], stdout=subprocess.PIPE).stdout.decode('utf-8')
print(res)
def pipi(modulestr):
res = subprocess.run(['pip', 'install', modulestr], stdout=subprocess.PIPE).stdout.decode('utf-8')
print(res)
def pipie(modulestr):
res = subprocess.run(['git', 'install', '-e', modulestr], stdout=subprocess.PIPE).stdout.decode('utf-8')
print(res)
def wget(url, outputdir):
res = subprocess.run(['wget', url, '-P', f'{outputdir}'], stdout=subprocess.PIPE).stdout.decode('utf-8')
print(res)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mingmao2021/disco-diffusion.git
git@gitee.com:mingmao2021/disco-diffusion.git
mingmao2021
disco-diffusion
disco-diffusion
main

搜索帮助

0d507c66 1850385 C8b1a773 1850385