Skip to content

Instantly share code, notes, and snippets.

View nkvoll's full-sized avatar

Njal Karevoll nkvoll

  • Elastic
  • Voss, Norway
View GitHub Profile
### Keybase proof
I hereby claim:
* I am nkvoll on github.
* I am nkvoll (https://keybase.io/nkvoll) on keybase.
* I have a public key ASAe1pFwYobtKHCoH-aRN2tAnLHI3pIhLJuS2_3ee7Gv8Ao
To claim this, I am signing this object:
_type: a
foo: 1
---
_type: b
foo: test
text: 1.flv
analyzer:
default:
type: standard
keyword:
type: keyword
my_id: A01
---
my_id: A02
---
my_id: A011
---
my_id: A012
analyzer:
casesensitive:
type: custom
tokenizer: standard
filter: [standard, stop]
@nkvoll
nkvoll / documents.yaml
Created November 25, 2013 12:44
Example from "A data exploration workflow for mappings", an article on Foundation (https://www.found.no/foundation/)
userId: 10
name:
first: Katherine
last: Jones
tags:
- trick manager
- restaurant manager
---
userId: 14
name:
$ python test_memory.py
generating documents from a set of 98569
used memory: 14372
adding documents to the database...
0
1000
2000
3000
4000
5000
import zmq
import time
c = zmq.Context()
s = c.socket(zmq.PULL)
s2 = c.socket(zmq.PULL)
s.setsockopt(zmq.HWM, 1)
s2.setsockopt(zmq.HWM, 25)
njal@ubuntu:~/tmp$ virtualenv --no-site-packages pyctest
New python executable in pyctest/bin/python
Installing distribute..................................................................................................................................................................................done.
njal@ubuntu:~/tmp$ cd pyctest
njal@ubuntu:~/tmp/pyctest$ source bin/activate
(pyctest)njal@ubuntu:~/tmp/pyctest$ pip install pycrypto==2.3
Downloading/unpacking pycrypto==2.3
Downloading pycrypto-2.3.tar.gz (331Kb): 331Kb downloaded
Running setup.py egg_info for package pycrypto
Installing collected packages: pycrypto