我面临一个奇怪的问题.我已经安排了一个批处理文件的任务.当我用选项运行任务时Run only when user is logged on一切正常.但我想在后台运行此任务,因此我使用该选项运行它Run whether user is logged on or not.现在,当我运行任务时,它无法正常工作.我得到了2个错误.我不明白这个错误.请帮我解决这个问题.
Task Scheduler failed to launch action "C:\Windows\SYSTEM32\cmd.exe" in instance "{2a7cc950-fad9-4633-9701-af75a0fd220d}" of task "\stmm\Daemon". Additional Data: Error Value: 2147942667.
Task Scheduler failed to start instance "{2a7cc950-fad9-4633-9701-af75a0fd220d}" of "\stmm\Daemon" task for user "GBLADHEDANI\N011940" . Additional Data: Error Value: 2147942667.
Run Code Online (Sandbox Code Playgroud) 我试图比较std::sort(使用std::vector结构)和英特尔ipp排序的性能.
我在Intel Xeon处理器上运行此测试 model name : Intel(R) Xeon(R) CPU X5670 @ 2.93GHz
我正在排序长度为20000个元素的向量并排序200次.我尝试了2种不同的ipp排序程序即.ippsSortDescend_64f_I和ippsSortRadixDescend_64f_I.在所有情况下,ipp排序至少比5至10倍慢std::sort.我期待ipp较小阵列的排序可能会慢一些,但除此之外通常应该更快std::sort.我在这里错过了什么吗?我究竟做错了什么?
std::sort 在我的所有测试用例中始终更快.
这是我的计划
#include <array>
#include <iostream>
#include <algorithm>
#include <stdlib.h>
#include <time.h>
#include <sys/time.h>
#include <sys/timeb.h>
#include <vector>
#include <chrono>
#include "ipp.h"
using namespace std;
const int SIZE = 2000000;
const int ITERS = 200;
//Chrono typedefs
typedef std::chrono::high_resolution_clock Clock;
typedef std::chrono::microseconds microseconds;
//////////////////////////////////// std /////////////////////////////////// …Run Code Online (Sandbox Code Playgroud) 执行下面的代码时出现异常
bool FieldValueMessage::Get(const std::string &field, double & value)
{
string text;
if(Get(field,text))
{
std::stringstream sstr(text);
sstr >> value;
if(sstr.fail())
return false;
else
return true;
}
else
{
return false;
}
}
Run Code Online (Sandbox Code Playgroud)
获取功能如下
bool HashMapMessage::Get(const std::string &field, std::string & value)
{
Field2Value::iterator i = f2v.find(field);
if(i==f2v.end()){
return false;
} else {
value = i->second;
return true;
}
}
Run Code Online (Sandbox Code Playgroud)
Get函数的调用者.我在这里看不到任何问题.
for(i=quote_fields.begin(),j=0;i!=quote_fields.end();i++,j++){
if (msg->Get((*i).c_str(),tmp)){
if(tmp>0 && x->staging_data[j+1]!=tmp){
x->staging_data[j+1] = tmp;
has_update = true;
}
}
}
Run Code Online (Sandbox Code Playgroud)
调用堆栈是
ntdll.dll!_RtlpCoalesceFreeBlocks@16() + 0x35 bytes
ntdll.dll!_RtlFreeHeap@12() + …Run Code Online (Sandbox Code Playgroud) 我们可以使用iron python在.NET空间中加载pandas DataFrame吗?如果不是,我正在考虑将pandas df转换为csv文件,然后读入.net空间.
我知道有很多日志监控工具(有尾部功能),我已经尝试了很多.虽然它们都非常好,我正在寻找一个我还没有找到的特定功能.所有这些日志监控工具都可以轻松添加此功能.我想要的功能是......
如果这是混乱,让我知道.
我有一个简单的程序,它读取包含几百万行的大文件,解析每一行(numpy array)并转换为一个双精度数组(python array),然后写入一个hdf5 file.我重复这个循环多天.读完每个文件后,我删除所有对象并调用垃圾收集器.当我运行该程序时,第一天解析没有任何错误,但在第二天我得到MemoryError.我监视了我的程序的内存使用情况,在解析的第一天,内存使用量约为1.5 GB.第一天解析完成后,内存使用量将降至50 MB.现在当第二天开始,我尝试从我得到的文件中读取行MemoryError.以下是该计划的输出.
source file extracted at C:\rfadump\au\2012.08.07.txt
parsing started
current time: 2012-09-16 22:40:16.829000
500000 lines parsed
1000000 lines parsed
1500000 lines parsed
2000000 lines parsed
2500000 lines parsed
3000000 lines parsed
3500000 lines parsed
4000000 lines parsed
4500000 lines parsed
5000000 lines parsed
parsing done.
end time is 2012-09-16 23:34:19.931000
total time elapsed 0:54:03.102000
repacking file
done
> s:\users\aaj\projects\pythonhf\rfadumptohdf.py(132)generateFiles()
-> while single_date …Run Code Online (Sandbox Code Playgroud) 我之前的代码是pandas数据帧列表的列表,如下所示
rowResults = [ [df, df, df], [df, df, df], ... [df, df, df] ]
results=results.append(rowResults)
Run Code Online (Sandbox Code Playgroud)
由于所有数据帧都具有完全相同的列,因此当我添加上面的列表时,它将整个数据结构转换为单个数据帧,其列数与单个数据帧相同.
现在,由于性能问题,我已将小型数据帧转换为字典.如果我创建了大量的数据帧,我发现在存储pandas数据帧使用的元数据信息时存在某种内存泄漏.当我使用字典时,不会发生这种情况.
我的新代码如下所示
rowResults = [ [dict, dict, dict], [dict, dict, dict], ... [dict, dict, dict] ]
results=results.append(rowResults)
Run Code Online (Sandbox Code Playgroud)
上面的代码与之前的情况没有相同的效果,这是正常的.如何转换上面的字典列表列表,以便最终的pandas数据帧具有与字典键相同的列?在字典的情况下,我的输出如下
(Pdb) results
<class 'pandas.core.frame.DataFrame'>
Int64Index: 799 entries, 0 to 798
Data columns:
0 799 non-null values
1 799 non-null values
2 799 non-null values
column1 0 non-null values
column2 0 non-null values
column3 0 non-null values
column4 0 non-null values
Run Code Online (Sandbox Code Playgroud)
请指教.
我在我的应用程序(C#.NET)中使用多媒体计时器来提高计时器的准确度并实现1 ms的计时器频率.到目前为止,我的应用程序一直运行良好,直到最近才开始表现得很奇怪.我试图了解我的申请有什么问题.以下是采取的步骤
你能解释一下计时器对象的行为吗?所有线程实际上都指向同一个定时器对象,因为它只有一个进程吗?为什么其他线程没有调用定时器回调?
python ×3
.net ×2
c# ×2
c++ ×2
pandas ×2
performance ×2
alert ×1
h5py ×1
intel ×1
intel-ipp ×1
ironpython ×1
logging ×1
monitoring ×1
numpy ×1
python.net ×1
timer ×1
windows-7 ×1