For neocomplete
brew uninstall vim
brew install luajit
brew install vim --with-lua
brew uninstall macvim
brew install macvim --with-cscope --with-lua --HEAD| #!/usr/bin/env python | |
| ############################################################################# | |
| ## | |
| ## Copyright (C) 2010 Riverbank Computing Limited. | |
| ## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). | |
| ## All rights reserved. | |
| ## | |
| ## This file is part of the examples of PyQt. |
For neocomplete
brew uninstall vim
brew install luajit
brew install vim --with-lua
brew uninstall macvim
brew install macvim --with-cscope --with-lua --HEAD| execute pathogen#infect() | |
| colorscheme molokai | |
| syntax enable | |
| filetype indent plugin on | |
| set nocompatible | |
| set backspace=indent,eol,start | |
| set tabstop=4 | |
| set shiftwidth=4 |
| from datetime import datetime | |
| from elasticsearch import Elasticsearch | |
| es = Elasticsearch() | |
| es.indices.create("brands") | |
| # Mapping for suggester | |
| # It should include [property]_suggest property for suggester | |
| mapping = { |
| def repeat(object, times=None): | |
| # repeat(10, 3) --> 10 10 10 | |
| if times is None: | |
| while True: | |
| yield object | |
| else: | |
| for i in range(times): | |
| yield object |
| # fourFn.py | |
| # | |
| # Make the original fourFn.py simple to understand how it works. | |
| # | |
| # Original source code: | |
| # http://pyparsing.wikispaces.com/file/view/fourFn.py/30154950/fourFn.py | |
| import math | |
| import operator | |
| from pyparsing import Literal, CaselessLiteral, Word, Combine, \ |