Skip to content

Instantly share code, notes, and snippets.

asaasa
def _index_children(self, company_id, contacts_map):
children_map = defaultdict(list)
for contact_id, contact in contacts_map.items():
children_map[contact_id].extend(self._child_extender.process(contact))
failed, children_ids = self._put_children(company_id, children_map)
# find old and new contacts children in es
es_child_ids = self._search_all_child_docs(company_id, contacts_map.keys()).ids
# we take all contacts and subtract those contacts that were updated
es_remove_child_ids = set(es_child_ids).difference(children_ids)
self._remove_child_docs_by_ids(es_remove_child_ids)
def _index_children(self, company_id, contacts_map):
children_map = defaultdict(list)
for contact_id, contact in contacts_map.items():
children_map[contact_id].extend(self._child_extender.process(contact))
failed, children_ids = self._put_children(company_id, children_map)
# find old and new contacts children in es
es_child_ids = self._search_all_child_docs(company_id, contacts_map.keys()).ids
# we take all contacts and subtract those contacts that were updated
es_remove_child_ids = set(es_child_ids).difference(children_ids)
self._remove_child_docs_by_ids(es_remove_child_ids)
they are: [[u'LinkedIN', u'linkedin']]
they are: [[u'Linkedin', u'linkedin'], [u'facebook', u'Facebook']]
they are: [[u'google', u'Google'], [u'zac', u'Zac'], [u'CEE', u'cee'], [u'Justin', u'justin'], [u'Mac', u'mac'], [u'Materials', u'materials']]
they are: [[u'twitter', u'Twitter'], [u'Linkedin', u'linkedin']]
they are: [[u'Dunbar', u'dunbar']]
they are: [[u'norfolk', u'Norfolk', u'NOrfolk'], [u'p', u'P'], [u'ian lowe', u'IAN LOWE'], [u'ASMC - Fairfield', u'asmc - Fairfield'], [u'Claire', u'claire'], [u'Doncaster', u'doncaster'], [u'january', u'January'], [u'database philippe', u'Database Philippe'], [u'mason', u'Mason'], [u'Month - September', u'month - September'], [u'anti bullying', u'Anti Bullying'], [u'july', u'July'], [u'Brekk', u'brekk'], [u'Bedfordshire', u'bedfordshire'], [u'WAyne telesales 14/10/2015', u'wayne telesales 14/10/2015'], [u'show - MSMO', u'Show - MSMO'], [u'Wedding', u'wedding'], [u'Magician', u'magician'], [u'Masons', u'masons'], [u'Eugene Matthias', u'eugene matthias'], [u'steve kem
└ (develop)[ $ devtools/release twitter_api_limits
Pulling latest updates from remote origin
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
SHA256:9sEJf8SwcobMYGu0dKOnYWnX9xTHDV8mnHmB2d7QUhs.
interpretation( 2, [number=1, seconds=0], [
function(c1, [ 0 ]),
function(g(_), [ 0, 0 ]),
function(f(_,_), [
1, 1,
0, 1 ]),
import itertools
class Valuation(object):
def __init__(self, literals):
self.literals = literals
self._vals = list(itertools.product([True, False], repeat=len(literals)))
def __iter__(self):
for arr in self._vals:
curl -XDELETE searchc1.virtual.ninternal.com:9200/test_uax
curl -XPOST searchc1.virtual.ninternal.com:9200/test_uax/ -d '{
"settings": {
"index": {
"analysis": {
"analyzer": {
"uax_email": {
"filter": [
"trim",
New code warnings:
13a14,123
> src/nimble_core/nimble_core/backend/sync/api.py:3: ISyncComponent imported but unused
> src/nimble_core/nimble_core/backend/sync/api.py:4: GroupSync imported but unused
> src/nimble_core/nimble_core/backend/testing/__init__.py:8: 'from should_dsl import *' used; unable to detect undefined names
> src/nimble_core/nimble_core/backend/testing/__init__.py:9: 'from should_dsl.matchers import *' used; unable to detect undefined names
> src/nimble_core/nimble_core/cache/api.py:13: ThreadlocalCache imported but unused
> src/nimble_core/nimble_core/cache/api.py:13: MemoryCache imported but unused
> src/nimble_core/nimble_core/cache/api.py:14: BulkCachedResourceProviderMixin imported but unused
> src/nimble_core/nimble_core/cache/api.py:14: MemoryCachedObjectProviderMixin imported but unused
@serj-p
serj-p / fail
Created September 17, 2015 08:02
Traceback (most recent call last):
File "/Users/sergii/Documents/work/postindustria/nimble/nimble-all/nimble-server/eggs/nose-1.1.2-py2.7.egg/nose/loader.py", line 390, in loadTestsFromName
addr.filename, addr.module)
File "/Users/sergii/Documents/work/postindustria/nimble/nimble-all/nimble-server/eggs/nose-1.1.2-py2.7.egg/nose/importer.py", line 39, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/Users/sergii/Documents/work/postindustria/nimble/nimble-all/nimble-server/eggs/nose-1.1.2-py2.7.egg/nose/importer.py", line 86, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/Users/sergii/Documents/work/postindustria/nimble/nimble-all/nimble-server/src/nimble_wufoo/nimble_wufoo/bgtasks/__init__.py", line 3, in <module>
from .handle_contact import task_create_wufoo_contact
File "/Users/sergii/Documents/work/postindustria/nimble/nimble-all/nimble-server/src/nimble_wufoo/nimble_wufoo/bgtasks/handle_contact.py", line 11, in <module>