Search Results

Search found 13683 results on 548 pages for 'python sphinx'.

Page 2/548 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Thinking sphinx: Problems with polymorphic associations

    - by auralbee
    Hello, I recently switched from ultrasphinx to thinking_sphinx for full-text search. I am trying to figure out how to index fields of polymorphic associations. I found some information but I still have some problems, although it seems to be easy. Here is my setup: class Info < ActiveRecord::Base belongs_to :mappable, :polymorphic => true define_index indexes mappable_type indexes mappable(:name), :as => :mappable_name end class A < ActiveRecord::Base has_many :infos, :as => :mappable end class B < ActiveRecord::Base has_many :infos, :as => :mappable end Amongst others, I want to do a search in the name column of A and B (both classes have this column), so I added the field to my index. When I do rake thinking_sphinx:index I get the following error: Generating Configuration to .../config/development.sphinx.conf rake aborted! undefined method `connection' for Object:Class .../.gem/ruby/1.8/gems/thinking-sphinx-1.3.16/lib/thinking_sphinx/ association.rb:149:in `casted_options' Any idea? Am I missing something? Thanks in advance. Tobi

    Read the article

  • Sphinx - Python modules, classes and functions documentation

    - by user343934
    Hi everyone, I am trying to document my small project through sphinx which im recently trying to get familiar with. I read some tutorials and sphinx documentation but couldn't make it. Setup and configurations are ok! just have problems in using sphinx in a technical way. My table of content should look like this --- Overview .....Contents ----Configuration ....Contents ---- System Requirements .....Contents ---- How to use .....Contents ---- Modules ..... Index ......Display ----Help ......Content Moreover my focus is on Modules with docstrings. Details of Modules are Directory:- c:/wamp/www/project/ ----- Index.py >> Class HtmlTemplate: .... def header(): .... def body(): .... def form(): .... def header(): .... __init_main: ##inline function ----- display.py >> Class MainDisplay: .... def execute(): .... def display(): .... def tree(): .... __init_main: ##inline function My Documentation Directory:- c:/users/abc/Desktop/Documentation/doc/ --- _build --- _static --- _templates --- conf.py --- index.rst I have added Modules directory to the system environment and edited index.rst with following codes just to test Table of content. But i couldn't extract docstring directly Index.rst T-Alignment Documentation The documentation covers general overview of the application covering functionalities and requirements in details. To know how to use application its better to go through the documentation. .. _overview: Overview .. _System Requirement: System Requirement Seq-alignment tools can be used in varied systems base on whether all intermediary applications are available or not like in Windows, Mac, Linux and UNIX. But, it has been tested on the Windows working under a beta version. System Applications Server .. _Configuration:: Configuration Basic steps in configuration involves in following categories Environment variables Apache setting .. _Modules:: Modules How can i continue from here... Moreover, i am just a beginner to sphinx documentation tool I need your suggestions to brings my modules docstring to my documentation page Thanks

    Read the article

  • Using Sphinx with a distutils-built C extension

    - by detly
    I have written a Python module including a submodule written in C: the module itself is called foo and the C part is foo._bar. The structure looks like: src/ foo/__init__.py <- contains the public stuff foo/_bar/bar.c <- the C extension doc/ <- Sphinx configuration conf.py ... foo/__init__.py imports _bar to augment it, and the useful stuff is exposed in the foo module. This works fine when it's built, but obviously won't work in uncompiled form, since _bar doesn't exist until it's built. I'd like to use Sphinx to document the project, and use the autodoc extension on the foo module. This means I need to build the project before I can build the documentation. Since I build with distutils, the built module ends up in some variably named dir build/lib.linux-ARCH-PYVERSION — which means I can't just hard-code the directory into a Sphinx' conf.py. So how do I configure my distutils setup.py script to run the Sphinx builder over the built module? For completeness, here's the call to setup (the 'fake' things are custom builders that subclass build and build_ext): setup(cmdclass = { 'fake': fake, 'build_ext_fake' : build_ext_fake }, package_dir = {'': 'src'}, packages = ['foo'], name = 'foo', version = '0.1', description = desc, ext_modules = [module_real])

    Read the article

  • Learn to use PHP and Python with Oracle Database

    - by christopher.jones
    The Oracle Learning Library has posted up the latest "Oracle By Example" labs giving an introduction to PHP & Python with the Oracle Database : Using PHP with Oracle Database 11g - a basic introduction Developing a PHP Web Application with Oracle Database 11g - a Zend Framework application using the NetBeans IDE Using Python With Oracle Database 11g - a basic introduction Using the Django Framework with Python and Oracle Database 11g - a basic web application

    Read the article

  • Installing Sphinx on Ubuntu - install location

    - by Alex
    I have to install Sphinx on my Ubuntu 11.10 for it to work on a ruby app. I managed to install it through synaptics, however when I run my sphinx (rake ts:rebuild) I get an error message saying: Sphinx cannot be found on your system. You may need to configure the following settings in your config/sphinx.yml file: * bin_path * searchd_binary_name * indexer_binary_name I guess I just need to edit the sphinx.yml file with the right info but hey, i can't seem to find out where sphinx is. Any help? Thx Alex

    Read the article

  • Where is Sphinx located after I install it?

    - by Alex
    I have to install Sphinx on my Ubuntu 11.10 for it to work on a ruby app. I managed to install it through synaptics, however when I run my sphinx (rake ts:rebuild) I get an error message saying: Sphinx cannot be found on your system. You may need to configure the following settings in your config/sphinx.yml file: * bin_path * searchd_binary_name * indexer_binary_name I guess I just need to edit the sphinx.yml file with the right info but hey, I can't seem to find out where sphinx is. Any help?

    Read the article

  • xterm python subprocess

    - by Quacked Python
    If using subprocess to execute an xterm on linux, which in turn executes some other process, it seems that Python (2.6.5) will never recognize that the process (xterm) has completed execution. Consider the following code: import subprocess import shlex import time proc = subprocess.Popen(shlex.split('xterm -iconic -title "FOO_BAR" -e sleep 5')) while True: if proc.poll(): print 'Process completed' time.sleep(0.1) This will loop infinitely until you terminate the Python interpreter. I'm guessing that this is probably caused by some oddity with xterm, and not a direct cause of the Python subprocess module, but maybe there are some other smart people out there that could shed some light on the situation. Note: Calling proc.communicate() will in fact return when the xterm completes, but for some reason the poll method will not work.

    Read the article

  • Python 2.4 inline if statements

    - by Marcus Whybrow
    I am setting up an existing django project on a dreamhost web server, so far I have got everything to work correctly. However I developed under python 2.5 and dreamhost by default uses python 2.4. The following line seems gives a syntax error because of the if keyword: 'parent': c.parent.pk if c.parent is not None else None ^ Is it the case that this form of if statement was introduced in Python 2.5, if so is there an easy change that would make it compatible with Python 2.4? Or, should I just change to Python 2.5. I have already installed python 2.5 to a directory under my home directory, and have succeeded in running the python interpreter under 2.5. If I wish to use Python 2.5 for everything, where can I set this?

    Read the article

  • Am I reindexing this Sphinx index correctly?

    - by Ethan
    According to the Thinking Sphinx docs... Turning on delta indexing does not remove the need for regularly running a full re-index ... So I set up this cron job... 50 10 * * * cd /var/www/my_app/current && /opt/ruby/bin/rake thinking_sphinx:index RAILS_ENV=production >> /var/www/my_app/current/log/reindexing.log 2>&1 Is that a reasonable way to do it? Should I be doing something different?

    Read the article

  • Error with python-setuptools doing "sudo easy_install python-graph-core"

    - by Dan
    Using easy_install, part of the python-setuptools, I get the following error: $ sudo easy_install python-graph-core [sudo] password for dan: Searching for python-graph-core Reading http://pypi.python.org/simple/python-graph-core/ Reading http://code.google.com/p/python-graph/ Reading http://code.google.com/p/python-graph/downloads/list?can=1 Reading http://code.google.com/p/python-graph/downloads/list Best match: python-graph-core 1.7.0 Downloading http://python-graph.googlecode.com/files/python-graph-core-1.7.0.tar.gz Processing python-graph-core-1.7.0.tar.gz Running python-graph-core-1.7.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-GwpYiM/python-graph-core-1.7.0/egg-dist-tmp-1yqbyV setup.py:8: Warning: 'as' will become a reserved keyword in Python 2.6 Traceback (most recent call last): File "/usr/bin/easy_install", line 8, in <module> load_entry_point('setuptools==0.6c9', 'console_scripts', 'easy_install')() File "/usr/lib/python2.5/site-packages/setuptools/command/easy_install.py", line 1671, in main with_ei_usage(lambda: File "/usr/lib/python2.5/site-packages/setuptools/command/easy_install.py", line 1659, in with_ei_usage return f() File "/usr/lib/python2.5/site-packages/setuptools/command/easy_install.py", line 1675, in <lambda> distclass=DistributionWithoutHelpCommands, **kw File "/usr/lib/python2.5/distutils/core.py", line 151, in setup dist.run_commands() File "/usr/lib/python2.5/distutils/dist.py", line 974, in run_commands self.run_command(cmd) File "/usr/lib/python2.5/distutils/dist.py", line 994, in run_command cmd_obj.run() File "/usr/lib/python2.5/site-packages/setuptools/command/easy_install.py", line 211, in run self.easy_install(spec, not self.no_deps) File "/usr/lib/python2.5/site-packages/setuptools/command/easy_install.py", line 446, in easy_install return self.install_item(spec, dist.location, tmpdir, deps) File "/usr/lib/python2.5/site-packages/setuptools/command/easy_install.py", line 476, in install_item dists = self.install_eggs(spec, download, tmpdir) File "/usr/lib/python2.5/site-packages/setuptools/command/easy_install.py", line 655, in install_eggs return self.build_and_install(setup_script, setup_base) File "/usr/lib/python2.5/site-packages/setuptools/command/easy_install.py", line 930, in build_and_install self.run_setup(setup_script, setup_base, args) File "/usr/lib/python2.5/site-packages/setuptools/command/easy_install.py", line 919, in run_setup run_setup(setup_script, args) File "/usr/lib/python2.5/site-packages/setuptools/sandbox.py", line 27, in run_setup lambda: execfile( File "/usr/lib/python2.5/site-packages/setuptools/sandbox.py", line 63, in run return func() File "/usr/lib/python2.5/site-packages/setuptools/sandbox.py", line 29, in <lambda> {'__file__':setup_script, '__name__':'__main__'} File "setup.py", line 8 except ImportError as ie: ^ SyntaxError: invalid syntax Any suggestions to what I may be doing wrong? Thanks, Dan

    Read the article

  • Best way of learning Python + GUI when coming from .NET

    - by Oscar Mederos
    I've been developing applications in C# / VB.NET for about 3-4 years (.NET Framework v2.0, 3.5, 4). I have also developed some command-line applications or scripts in C, and Python under Linux. Sometimes I need to develop my applications in another languages, like Python, but the problem thing is that lots of those applications require a GUI. Maybe not a too complex one, but it does require some windows with buttons, text boxes, list boxes,... What books/tips/tutorials do you suggest me to start working with that language and be able to deploy my deliverables not only in .NET? Note: Learning python is not the big deal here, because I already know the basic of it. I just want to focus on the GUI. Maybe this question should be on UI instead of here? If so, please, migrate it :)

    Read the article

  • How to make zebra table with Sphinx? Or how to use jQuery with Sphinx?

    - by prosseek
    I think the table generated from Sphinx is not pretty, as it produces the following HTML code for table. <table border="1" class="docutils"> <colgroup> <col width="43%" /> <col width="29%" /> <col width="29%" /> </colgroup> <thead valign="bottom"> <tr><th class="head">Graph</th> <th class="head">HIR</th> <th class="head">AIR</th> </tr> </thead> <tbody valign="top"> <tr><td>Graph</td> <td>Circuit</td> <td>System</td> </tr> </tbody> </table> How can I turn in into pretty one, for example, zebra table? The HTML generated html has the jQuery, and according to this site, it's just one line of code to have a zebra table, but I'm not sure how to use jQuery to make a zebra table. $("tr:nth-child(odd)").addClass("odd"); Q: How to use jQuery with Sphinx? Q: Is there any other way to have a zebra table with Sphinx?

    Read the article

  • How can I install a 32bit python on 64 bit Ubuntu

    - by moose
    I am using Ubuntu 10.10 (Linux pc07 2.6.35-27-generic #48-Ubuntu SMP Tue Feb 22 20:25:46 UTC 2011 x86_64 GNU/Linux) and the default python package (Python 2.6.6). I would like to install python-psyco to improve the performance of one of my scripts, but only python-psyco-doc is available for 64 bit. I tried a virtual machine, but the the performance boost is much less on the virtual machine than on a "real" installed 32-bit Ubuntu. So my question is: How can I install a 32Bit Python with psyco on my 64Bit Ubuntu machine? edit: I've found this article and made this: Download "Python 2.7.1 bzipped source tarball" from http://python.org/download/ Go in the directory where you decompressed "Python 2.7.1" $ OPT=-m32 LDFLAGS=-m32 ./configure --prefix=/opt/pym32 $ make But I got this error: gcc -pthread -m32 -Xlinker -export-dynamic -o python \ Modules/python.o \ libpython2.7.a -lpthread -ldl -lutil -lm libpython2.7.a(posixmodule.o): In function `posix_tmpnam': /home/moose/Downloads/Python-2.7.1/./Modules/posixmodule.c:7346: warning: the use of `tmpnam_r' is dangerous, better use `mkstemp' libpython2.7.a(posixmodule.o): In function `posix_tempnam': /home/moose/Downloads/Python-2.7.1/./Modules/posixmodule.c:7301: warning: the use of `tempnam' is dangerous, better use `mkstemp' Segmentation fault make: *** [sharedmods] Fehler 139 edit2: Now I've found http://indefinitestudies.org/2010/02/08/how-to-build-32-bit-python-on-ubuntu-9-10-x86_64/ and it seems like this worked: $ cd Python-2.7.1 $ CC="gcc -m32" LDFLAGS="-L/lib32 -L/usr/lib32 \ -Lpwd/lib32 -Wl,-rpath,/lib32 -Wl,-rpath,/usr/lib32" \ ./configure --prefix=/opt/pym32 $ make $ sudo make install But installing psyco didn't work: Download the lastest snapshot: http://psyco.sourceforge.net/download.html Extract it and go into the folder $ python setup.py install This error appeared: PROCESSOR = 'ivm' running install running build running build_py running build_ext building 'psyco._psyco' extension gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DALL_STATIC=1 -Ic/ivm -I/usr/include/python2.6 -c c/psyco.c -o build/temp.linux-x86_64-2.6/c/psyco.o In file included from c/psyco.c:1: c/psyco.h:9: fatal error: Python.h: Datei oder Verzeichnis nicht gefunden compilation terminated. error: command 'gcc' failed with exit status 1

    Read the article

  • Python and Ruby in Oracle Tuxedo

    - by christopher.jones
    Did you know you can now develop services and applications in Python or Ruby with Oracle Tuxedo? The Tuxedo team have a blog post about it at Python and Ruby in Tuxedo. I used to think of Tuxedo as a Transaction Processing Monitor but it has evolved into much more.

    Read the article

  • How can I assert from Python C code?

    - by Joe
    I'm writing a Python class in C and I want to put assertions in my debug code. assert.h suits me fine. This only gets put in debug compiles so there's no chance of an assert failure impacting a user of the Python code*. I'm trying to divide my 'library' code (which should be separate to the code linked against Python) so I can use it from other C code. My Python methods are therefore thinnish wrappers around my pure-C code. So I can't do this in my 'library' code: if (black == white) { PyErr_SetString(PyExc_RuntimeError, "Remap failed"); } because this pollutes my pure-C code with Python. It's also far uglier than a simple assert(black != white); I believe that the Distutils compiler always sets NDEBUG, which means I can't use assert.h even in debug builds. Mac OS and Linux. Help! *one argument I've heard against asserting in C code called from Python.

    Read the article

  • Complex Query with Sphinx

    - by maSnun
    I am using -- http://sphinxsearch.com/ . Its working fine for me except one problem. I need to exclude some entries where a specific field doesn't contain a word. Something that would look like this in mysql: Select * from table where yescolumn = 'query' and othercolumn not like '%keyword%' Please help. Thanks.

    Read the article

  • django sphinx automodule -- basics

    - by haras.pl
    Hi, I have a projects with several large apps and where settings and apps files are split. directory structure goes something like that: project_name __init__.py apps __init__.py app1 app2 3rdparty __init__.py lib1 lib2 settings __init__.py installed_apps.py path.py templates.py locale.py ... urls.py every app is like that __init__.py admin __init__.py file1.py file2.py models __init__.py model1.py model2.py tests __init__.py test1.py test2.py views __init__.py view1.py view2.py urls.py how to use a sphinx to autogenerate documentation for that? I want something like that for each in settings module or INSTALLED_APPS (not starting with django.* or 3rdparty.*) give me a auto documentation output based on docstring and autogen documentation and run tests before git commit btw. I tried doing .rst files by hand with .. automodule:: module_name :members: but is sucks for such a big project, and it does not works for settings Is there an autogen method or something? I am not tied to sphinx, is there a better solution for my problem?

    Read the article

  • Thinking Sphinx - sorting by a string attribute gets out of sync when changes are made

    - by Scott Brown
    I have a "restaurants" table with a "name" column. I've defined the following index: indexes "REPLACE(UPPER(restaurants.name), 'THE ', '')", :as => :restaurant_name, :sortable => true ... because I want to sort the restaurant names without respect to the prefix "The ". My problem is that whenever one of these records is updated (in any way) the new record jumps to the top of the sort order. If another record is updated, it also jumps ahead of the rest. I end up with two lists: a list of restaurants that have been updated since the last re-indexing and a list of those that haven't. Each respective list is in alphabetical order, but I don't understand why the overall list is getting segregated this way. I do have a delayed delta index set up, and I assume the issue is related to this.

    Read the article

  • Thinking sphinx, has_one association

    - by homakov
    Hi, anybody, please, help me with Thinking_sphinx configuration. I have table profile1, which has_one profile2 and profile3. So i just need to index them both, but i can't. I tried indexes name indexes profile2(:name), :as = :profile2_name indexes profile3(:name), :as = :profile3_name has id What i m doing wrong? Thanks.

    Read the article

  • Sphinx autodoc is not automatic enough

    - by Cory Walker
    I'm trying to use Sphinx to document a 5,000+ line project in Python. It has about 7 base modules. As far as I know, In order to use autodoc I need to write code like this for each file in my project: .. automodule:: mods.set.tests :members: :show-inheritance: This is way too tedious because I have many files. It would be much easier if I could just specify that I wanted the 'mods' module to be documented. Sphinx could then recursively go through the module and make a page for each submodule. Is there A feature like this? If not I could write a script to make all the .rst files, but that would take up a lot of time.

    Read the article

  • Assign weight to a integer column for Sphinx search

    - by Daniel
    Hello: I have a note table with columns: title :string content :text rating :integer and a thinking_sphinx configuration: define_index do indexes :title, :sortable => true indexes :content end Then I can search the notes and assign weights to title and content to define the order or the result: Note.search "abc", :match_mode => :extended, :field_weights => { :title => 10, :content => 3 } Now I want to assign a weight to the rating column The type of the rating column is integer. The range of the rating is [1, 2, 3, 4, 5]. Can I just add weight at the :field_weights :field_weights => { :title => 10, :content => 3, :rating => 5 } or I need to do something else to make the note which has higer rating display first?

    Read the article

  • thinking sphinx ordering by mixing capitals and lower case

    - by miccet
    I have a rails application that is using thinking_sphinx for the searching. My problem is that the result returned is sorted with capitals first and lower case after it at the bottom. I'd like to mix them so that both 'A' and 'a' comes before 'B'. This is the method I'm using: Company.search(query, :star => true, :page => params[:page], :per_page => 20, :order => :name, :sort_mode => :asc)

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >