Skip to content

Instantly share code, notes, and snippets.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sangheestyle
sangheestyle / hellogl.py
Created June 25, 2015 22:44
Hellogl by Riverbank
#!/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.
@sangheestyle
sangheestyle / readme.md
Created July 26, 2015 18:34
Vim for go programming on mac

How to

Steps

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
@sangheestyle
sangheestyle / suggestor.py
Created October 16, 2015 14:44
Simple experiement on using suggestor in ES
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 = {
@sangheestyle
sangheestyle / install_and_using.md
Last active February 25, 2021 21:43
Install and using numba on mac

Install and using numba on mac

  • Mac version: 10.11.3
  • Python version: 3.5.1

Install

$ brew tap homebrew/versions
$ brew install llvm37
@sangheestyle
sangheestyle / May 26, PyParsing.ipynb
Created June 1, 2016 21:54
Practicing simple query parser with pyparsing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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, \
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.