I am trying to compile the source code of MEGAM Ocaml library on an Ubuntu 64 machine.
I have OCaml installed (v 3.12.1), using sudo apt-get install ocaml.
I am having an issue when running the "make" command in the terminal on the unzipped source code, with OCaml returning the error:
/user/bin/ld: cannot find -lstr
collect2: error: ld returned 1 exit status
Run Code Online (Sandbox Code Playgroud)
The makefile is producing the following two commands:
ocamldep *.ml > .depend
Run Code Online (Sandbox Code Playgroud)
No error when run
ocamlc …
我有连接到Microsoft SQL Server实例从一个问题pyODBC的内Ubuntu (12.10)机.
我得到的错误是:
pyodbc.Error: ('IM002', '[IM002] [unixODBC][Driver Manager]Data Source name not found, and no default driver specified (0) (SQLDriverConnect)')
Run Code Online (Sandbox Code Playgroud)
用于pyodbc的连接字符串是:
self.corpus_cnxn = pyodbc.connect('DRIVER={FreeTDS};SERVER=UKEDN-06880;DATABASE=db1;UID=user;PWD=pass')
Run Code Online (Sandbox Code Playgroud)
这似乎可以在Windows中的pyODBC中正常工作(只需要将DRIVER更改为'SQL Server'而不是'FreeTDS'),当我尝试使用终端上的tsql 工具从Ubuntu机器连接时,它工作正常,以下命令:
tsql -S UKEDN-06880 -p 1433 -U user -P pass
Run Code Online (Sandbox Code Playgroud)
我可以选择任何没有问题的表,它似乎没有在pyODBC内工作.
任何帮助或建议将不胜感激,我的Linux技能非常弱,我完全陷入困境,虽然它从tsql工作,我感觉非常接近!
我坚持认为WCF中一个基本且易于解决的问题,只需要以正确的方式引导.
我有一个大对象(实际上是一个训练有素的文本分类器),我需要通过C#.NET中的Web服务公开它.当服务最初启动时,可以从磁盘加载分类器对象,但我不想继续为每个请求从磁盘加载它(服务请求当前在内存中占用大约6 GB的对象,并且需要一段时间才能保留从每个请求的磁盘加载它,所以我想在整个对该Web服务的所有请求中将该对象保留在内存中,并且只应在服务启动时加载该对象(而不是在第一个Web请求触发它时加载它).
我该怎么做呢?
谢谢你的帮助!
我一直在玩Python上的NLTK,但由于缺少任何版本的MEGAM库等于或高于0.3的Windows 64位可执行文件而无法使用MEGAM Max Ent算法(需要包含NLTK的-nobias选项)工作,在第0.3节中介绍.
http://www.cs.utah.edu/~hal/megam/
作者建议编译自己的可执行文件,尽管让O'Caml在Win64上运行只是另一个噩梦.
有没有人有MEGAM可执行文件的Windows编译版本是0.4或更高版本?我将永远感激不尽!
我正在尝试使用IronPython通过C#.NET运行Python类,Python类导入的几个模块是:
import collections
import nltk.classify.util
Run Code Online (Sandbox Code Playgroud)
为了在运行IronPython时导入它们,我使用ScriptEngine的GetSearchPath集合来添加Python库位置的路径,如下所示:
ICollection<string> paths = pyEngine.GetSearchPaths();
string dir = @"C:\Python27\Lib\";
paths.Add(dir);
string dir2 = @"C:\Python27\Lib\site-packages\nltk\classify\";
paths.Add(dir2);
pyEngine.SetSearchPaths(paths);
Run Code Online (Sandbox Code Playgroud)
这似乎对集合 Module 运行良好,但不是nltk.classify.util,并且在调用ScriptEngine的Execute方法时出现以下错误:
没有名为nltk.classify.util的模块
即使是util模块也存在于上面指定的路径中.我认为这个问题与在Python类中指定导入的方式有关('.'分隔),只是不确定如何解决它.任何想法出错的地方?
我有一个非常简单的 SSAS 维度,如下所示:
维度名称:DimKeyword
1个属性:Keyword,KeywordID为KeyColumn,Keyword(name)为NameColumn
使用 MDX,我想为 DimKeyword 维度获取具有Max MEMBER_KEY 的一行(不列出所有关键字),到目前为止我有:
WITH MEMBER KeywordID as
[Dim Keyword].[Keyword].currentmember.MEMBER_KEY
SELECT {KeywordID} on COLUMNS
FROM [Some Cube]
Run Code Online (Sandbox Code Playgroud)
虽然这似乎只返回 0 (我认为这是给成员的)。任何人都可以帮忙吗?
谢谢!
在Python(2.7)中,是否存在可通过基于字符串的索引访问的本地二维数据结构?
我知道你可以拥有一个可以用字符串索引访问的字典,例如:
>>> dic = dict()
>>> dic['grumpy'] = 'cat'
>>> print(dict['grumpy'])
'cat'
Run Code Online (Sandbox Code Playgroud)
但我想要的是一个可以访问的数据结构,如:
>>> dic['grumpy']['frumpy'] = 'cat'
>>> print(dict['grumpy']['frumpy'])
'cat'
Run Code Online (Sandbox Code Playgroud)
数组似乎是禁止的,因为它只允许基于整数的访问...任何建议?谢谢!
nltk ×3
python ×3
c# ×2
linux ×2
ubuntu ×2
.net ×1
dictionary ×1
dimensions ×1
ironpython ×1
matrix ×1
mdx ×1
ocaml ×1
pyodbc ×1
sql-server ×1
ssas ×1
wcf ×1
web-services ×1