问题标签 [ming]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
0 回答
31 浏览

python - 当 PyMongo 抛出 DuplicateKeyError 我怎么知道是哪个字段导致了冲突?

使用 Ming 和 PyMongo,我创建了多个具有多个唯一索引的文档。如果抛出 DuplicateKeyError,那么我想查询冲突的文档。有没有办法让我接受 DuplicateKeyError 异常并知道哪个字段(或字段组合)生成了异常?

这不是重复的,因为错误文档并不总是与 .details 一起返回(.error_document 的 2.8 版本)。我的理解可能包括在内。没有任何保证。在我的情况下 .details 在抛出重复键时返回 None 。

0 投票
1 回答
1653 浏览

python - mingw32-make can not be found in environment variables

I want to use install xgboost on my windows 7. but before that, when i installed MinGW-W64, it needed to use make command and when i type which mingw32-make in my git bash, it said that there is no mingw32-make in my Path ( although i gave an address for the directory of mingw32-make in the Path environment variable). So could someone help me with this or at least propose an easy way to use xgboost within ipython notebook?

enter image description here

0 投票
1 回答
113 浏览

python - 在 ming 中创建连接之前声明模型

我想在与数据库建立连接之前删除我的模型(出于某种原因,例如多线程和数据库配置 uri 的动态加载)。

文档说要这样使用:

我们可以看到模型声明需要什么session(在 中__mongometa__)。如何声明没有session变量的 WikiPage 模型?然后再设置?

0 投票
1 回答
283 浏览

python-3.x - 如何使用 MinGW 编译 XGBoost

我按照此处此处给出的说明在我的 Windows 10 上运行 XGBoost for Python。我已经安装了适用于 Windows 的 Git,但是当我尝试后续步骤时出现以下错误:

有没有更简单的方法让 XGBoost for Python 在 Windows 上运行?

任何帮助将非常感激。

0 投票
0 回答
23 浏览

python-3.x - 如何将 ThreadLocalODMSession 的会话对象传递给另一个 python 文件中定义的类?

我希望我能正确解释这个问题。

我想ThreadLocalODMSession在一个 python 文件中定义对象,并用代表 mongo 集合的类定义了其他几个文件。但是 ming 的示例源代码始终将ThreadLocalODMSession对象显示为局部变量,即在集合定义类session的子类中设置变量。__mongometa__

在示例中, 的定义与(被调用的)对象WikiPage的定义在同一脚本中,并在定义中传递。ThreadLocalODMSessionsession__mongometa__

我希望能够将session对象传递给 的__init__方法WikiPage,然后让子类在创建__mongometa__时设置其副本。session

0 投票
0 回答
610 浏览

windows - 如何配置 mingw 来搜索库?

我正在尝试为 Windows 编译我的程序,我正在使用 mingw

但只找到了--cflags,--libs 确实返回了错误。

我已经尝试手动放置路径,但可能我使用了错误的路径,有人可以帮助我吗?