标签: batch-processing

通过批处理命令全屏?

我在 Windows 下有一个批处理脚本。当有人点击该脚本时,我希望命令窗口变成全屏,就像我们通过键盘快捷键所做的那样[Alt+Enter]

可以使用批处理文件中的任何命令自动完成吗?

windows batch-file batch-processing

2
推荐指数
1
解决办法
2万
查看次数

使用 Notepad++ 和 Regex 将文本添加到每个文件的末尾

我有 100 个文件,需要在每个文件的末尾附加一行。

有没有办法用 Notepad++ 来做到这一点?

append notepad++ eof batch-processing

2
推荐指数
1
解决办法
5767
查看次数

函数参数名称中的别名(双重命名)

在 Python 中,函数的参数是否可以有双重名称?我的意思是变量名的简短和完整形式。

我会尽量说得更清楚。熟悉 Autodesk Maya 的每个人都知道创建约束的功能。它有一些标志,您可以使用其名称的短或长形式:

维护偏移(mo),权重(w),层(l)等等..

所以你可以用不同的参数名称调用这个函数,但它会给你相同的结果:

cmds.parentConstraint(driverObj, drivenObj, maintainOffset=True, weight=1.0,..)
cmds.parentConstraint(driverObj, drivenObj, maintainOffset=True, w=1.0,..)
cmds.parentConstraint(driverObj, drivenObj, mo=True, weight=1.0,..)
cmds.parentConstraint(driverObj, drivenObj, mo=True, w=True,..)
Run Code Online (Sandbox Code Playgroud)

如何在 Python 2.7.x 中实现这种类型的行为?我正在积极使用文档,但仍然找不到答案。

此外,我为各种类型的约束定义了 4 个函数:

# Parent Constraint
def doParentConstraint(lst, mo = True, w = 1.0, sr = 'None', st = 'None', l = 'None'):
    for pair in lst:
        cmds.parentConstraint(pair[0], pair[1], maintainOffset = mo, weight = w,
                                skipRotate = sr, skipTranslate = st, layer = l)
# Orient Constraint
def doOrientConstraint(lst, …
Run Code Online (Sandbox Code Playgroud)

python constraints maya pointer-aliasing batch-processing

2
推荐指数
1
解决办法
911
查看次数

C/C++ 交互式解释器

我想知道是否有等效于 C/C++ 的 python 解释器:

$ python
Python 2.7.3 (default, Mar 13 2014, 11:03:55)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> "   test\n\n ".strip()
'test'
>>> import re
>>> re.search('([\d\.]*).tgz', 'package-2.1.5.tgz').group(1)
'2.1.5'
Run Code Online (Sandbox Code Playgroud)

到目前为止,我一直为此使用一个虚拟的 bash 脚本。它不是交互式的,但它阻止创建带有 main 等的 C++ 文件来检查单个或某些命令的结果。

我很确定我们可以以某种方式在 gdb 或 eclipse 中做到这一点,或者它存在于隐藏在包中的其他地方,所以如果你知道关于这个问题的有趣的东西,我很高兴知道它。感谢,并有一个愉快的一天。

 $ cat cInterpreter.sh
 #!/bin/bash

function usage {
  cat <<EOF
USAGE:
$0 '<semi-colon separated includes>' '<semi-colon separated commands>'

EXAMPLE:
$0 'arpa/inet.h' 'printf("%04x\n", htons(5294));'

EOF
}

if [ $# -ne 2 …
Run Code Online (Sandbox Code Playgroud)

c c++ interactive batch-processing

2
推荐指数
1
解决办法
1625
查看次数

有没有办法通过 API 或脚本在 Jive 中批量下载文件?

我们必须提取近 1,000 份文件进行资产剥离。通过点击来完成它需要很长时间。我知道 Jive 有一个 API,但我可以找到任何可以让我们从多个组下载多个文件的东西。

任何想法表示赞赏。

谢谢!

export batch-processing jive

2
推荐指数
1
解决办法
3001
查看次数

批处理和守护进程的区别

我是 UNIX 新手,对批处理进程和守护进程有基本的混淆。

基本上,Unix 中有 3 种类型的进程:交互式、批处理和守护进程。

我对交互过程非常清楚,但对批处理和守护进程仍然很困惑。

有人可以提供详细的解释和两者之间的区别吗?

unix linux daemon process batch-processing

2
推荐指数
1
解决办法
2771
查看次数

将BatchGraph与TitanGraph一起使用时出错

我正在尝试使用BatchGraph在Titan中加载数据.使用TitanGraph作为对象参数.

根据Tinkerpop的Batch Implementation,这是实现应该如何:

TitanGraph g = TitanFactory.open("titan-cassandra.properties");
BatchGraph bgraph = new BatchGraph( g, VertexIDType.STRING, 1000);
Run Code Online (Sandbox Code Playgroud)

但是在BatchGraph构造函数中需要TrasanctionalGraph对象.所以,当我把它投射为:

TitanGraph g = TitanFactory.open("titan-cassandra.properties");

 BatchGraph bgraph = new BatchGraph( (TransactionalGraph) g, VertexIDType.STRING, 1000)
Run Code Online (Sandbox Code Playgroud)

这会出现以下错误:

Exception in thread "main" java.lang.ClassCastException:
com.thinkaurelius.titan.graphdb.database.StandardTitanGraph cannot be cast to com.tinkerpop.blueprints.TransactionalGraph
Run Code Online (Sandbox Code Playgroud)

在这种情况下如何使用BatchGraph?如何处理?

我正在使用Titan 1.0.0和Blueprints 2.7.0以及cassandra 2.2.4版.

谢谢.

database batch-processing cassandra graph-databases titan

2
推荐指数
1
解决办法
285
查看次数

骡子批处理与foreach vs splitter-aggregator

在Mule中,我有很多要处理的记录,其中处理包括一些计算,来回到数据库等.我们可以使用这些选项处理记录集合

  1. 批量处理
  2. 的ForEach
  3. 分离器的聚合

    那么它们之间的主要区别是什么?什么时候我们应该更喜欢别人?

例如,Mule批处理选项似乎没有批处理作业范围变量定义.或者,如果我想利用多线程来加强整体任务,该怎么办?或者,如果我想在处理过程中修改有效负载,哪个更好?

mule batch-processing mule-component

2
推荐指数
1
解决办法
5707
查看次数

从触发者启动的作业中获取 SLURM 作业 ID

我有一个由三部分组成的 R 分析(partApartBpartC)。我将每个部分提交给 SLURM(例如sbatch partA),并且每个部分都通过 并行化#SBATCH --array=1-1500。这些零件是连续的,所以我需要等待一个零件完成才能开始下一个零件。现在我正在手动启动每项工作,但这不是一个很好的解决方案。

我想自动化这三个批处理调用。例如:

  1. sbatch partA
  2. 什么时候partA完成,sbatch partB
  3. 什么时候partB完成,sbatch partC

我使用此解决方案获取 的作业 ID partA,并将其传递给strigger完成上面的步骤 2。然而我陷入了困境,因为我不知道如何获取partBfromstrigger的工作 ID 。我的代码如下所示:

#!/bin/bash

# step 1: sbatch partA
partA_ID=$(sbatch --parsable partA.sh)

# step 2: sbatch partB
strigger --set --jobid=$partA_ID --fini --program=/path/to/partB.batch

# step 3: sbatch partC
... ?
Run Code Online (Sandbox Code Playgroud)

我该如何完成第 3 步?

linux hpc r batch-processing slurm

2
推荐指数
1
解决办法
2129
查看次数

如何根据mlr3中的指标列和批量训练预测对任务进行子集化?

背景

我正在使用 R 中的 mlr3 包进行建模和预测。我正在处理一个包含测试集和训练集的大数据集。测试集和训练集由指示符列指示(在代码中:test_or_train)。

目标

  1. 使用数据集中的 train_or_test 列指示的训练行对所有学习器进行批量训练。
  2. 使用相应的训练学习器批量预测 test_or_train 列中由“test”指定的行。

代码

  1. 占位符数据集与测试火车指标列。(在实际数据中 train-test split 不是人为的)
  2. 两个任务(在实际代码中任务是不同的,而且还有更多。)
library(readr)
library(mlr3)
library(mlr3learners)
library(mlr3pipelines)
library(reprex)
library(caret)

# Data
urlfile = 'https://raw.githubusercontent.com/shudras/office_data/master/office_data.csv'
data = read_csv(url(urlfile))[-1]

## Create artificial partition to test and train sets
art_part = createDataPartition(data$imdb_rating, list=FALSE)
train = data[art_part,]
test = data[-art_part,]

## Add test-train indicators
train$test_or_train = 'train'
test$test_or_train = 'test'

## Data set that I want to work / am working with
data = rbind(test, train)

# Create …
Run Code Online (Sandbox Code Playgroud)

r machine-learning batch-processing mlr3

2
推荐指数
1
解决办法
161
查看次数