Skip to content

Instantly share code, notes, and snippets.

@DXist
DXist / log
Created July 12, 2017 08:40
Issue in bigartm worker
Jul 12 02:02:41 bigdata-dmp-testing python[16583]: Exception in thread Thread-1:
Jul 12 02:02:41 bigdata-dmp-testing python[16583]: Traceback (most recent call last):
Jul 12 02:02:41 bigdata-dmp-testing python[16583]: File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
Jul 12 02:02:41 bigdata-dmp-testing python[16583]: self.run()
Jul 12 02:02:41 bigdata-dmp-testing python[16583]: File "/usr/lib/python3.5/threading.py", line 862, in run
Jul 12 02:02:41 bigdata-dmp-testing python[16583]: self._target(*self._args, **self._kwargs)
Jul 12 02:02:41 bigdata-dmp-testing python[16583]: File "/usr/lib/python3.5/multiprocessing/pool.py", line 119, in worker
Jul 12 02:02:41 bigdata-dmp-testing python[16583]: result = (True, func(*args, **kwds))
Jul 12 02:02:41 bigdata-dmp-testing python[16583]: File "/usr/local/lib/python3.5/dist-packages/bigartm-0.8.3-py3.5.egg/artm/master_component.py", line 865, in transform
Jul 12 02:02:41 bigdata-dmp-testing python[16583]: theta_matrix_info
@ikonst
ikonst / cfdata.py
Last active July 11, 2024 04:33
LLDB extension for saving CFData to local file; useful for remote iOS debugging
'''
INSTALLING
curl --create-dirs -o ~/.lldb/cfdata.py https://gist.githubusercontent.com/ikonst/364af37c44e5f549b722/raw/cfdata.py \
&& echo 'command script import ~/.lldb/cfdata.py' >> ~/.lldbinit
USING
(lldb) cfdata_save some_cfdata /Users/john/foo
(lldb) cfdata_save some_nsdata /Users/john/bar
@kristopherjohnson
kristopherjohnson / executionTimeInterval.swift
Last active May 29, 2024 19:25
Calculate execution time for a block of Swift code
import QuartzCore
func executionTimeInterval(block: () -> ()) -> CFTimeInterval {
let start = CACurrentMediaTime()
block();
let end = CACurrentMediaTime()
return end - start
}