尝试使用 pyenv 2.1.0(来自自制程序)在 MacOS 11.6 (Intel) 上安装 Python 3.10.0 失败,并显示:
python-build: use openssl@1.1 from homebrew
python-build: use readline from homebrew
Downloading Python-3.10.0.tar.xz...
-> https://www.python.org/ftp/python/3.10.0/Python-3.10.0.tar.xz
Installing Python-3.10.0...
python-build: use tcl-tk from homebrew
python-build: use readline from homebrew
python-build: use zlib from xcode sdk
BUILD FAILED (OS X 11.6 using python-build 20180424)
Inspect or clean up the working tree at /var/folders/rk/_qysk9hs40qcq14h44l57wch0000gn/T/python-build.20211006114013.40649
Results logged to /var/folders/rk/_qysk9hs40qcq14h44l57wch0000gn/T/python-build.20211006114013.40649.log
Last 10 log lines:
checking MACHDEP... "darwin"
checking for gcc... clang
checking whether the C compiler works... …Run Code Online (Sandbox Code Playgroud) 是否可以使用Python(通过Jython)编写Jenkins插件,如果是这样,我将在哪里开始?我不了解Java(并且目前没有真正的兴趣学习它)所以能够使用Python对我来说会很好.
我正在寻找一种算法,将矩形(比如1000x800)分割成n(或更多,但尽可能少的额外矩形)在该矩形内同样大小的矩形,因此使用了所有空间.小矩形也应该尽可能接近原始纵横比.
例如:
+---------------+
| |
| |
| |
+---------------+
Run Code Online (Sandbox Code Playgroud)
拆分n = 2:
+---------------+
| |
+---------------+
| |
+---------------+
Run Code Online (Sandbox Code Playgroud)
拆分n = 3
+-------+-------+
| | |
+-------+-------+
| | |
+---------------+
Run Code Online (Sandbox Code Playgroud)
等等.
有这样的算法吗?理想情况下我想在Python中使用它,但实际上任何语言都可以,因为我应该能够翻译它...
编辑:
一些额外的信息:
目标表面将是一个浏览器窗口,因此表面将大致为 4:3或16:9或其他流行尺寸.矩形由像素组成.宽高比不保证是整数.
与纵横比约束相比,较少过量的矩形略微优选.
我有这样的石墨烯突变:
class User(ObjectType):
username = String()
class ImportUsers(Mutation):
class Arguments:
users = List(User)
Output = List(User)
@staticmethod
def mutation(root, info, users):
...
Run Code Online (Sandbox Code Playgroud)
但石墨烯给了我以下错误:AssertionError: Mutations.importUsers(users:) argument type must be Input Type but got: [User].
如何在石墨烯中进行突变以接受对象列表?