Skip to content

Instantly share code, notes, and snippets.

@astojilj
astojilj / index.html
Created October 29, 2018 12:33
TensorFlow.js CNN Background Removal
<html>
<head>
<body onload="onLoad()">
<div id="container">
<div id="show-background">Show background as magenta<input id="show-background-toggle" type="checkbox" checked></div>
<canvas id="canvas" width=640px height=480px></canvas>
</div>
</body>
</head>
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@0.13.2"> </script>
@astojilj
astojilj / realsense sr300 depth device streams
Created July 1, 2016 11:47
realsense sr300 depth device streams
subtype 5A564E49-2D90-4A58-920B-773F1F2C556B
fourcc INVZ
495A4E49-1A66-A242-9065-D01814A8EF8A INZI
435A4E49-B602-480F-978C-E4E88AE89B89 INZC
49564E49-57DB-5E49-8E3F-F479532B946F INVI (16 bit, 10 bits of useful info https://github.com/IntelRealSense/librealsense/blob/master/src/image.cpp#L296)
52494150-8536-4841-B6BF-8FC6FFB083A8 PAIR
[12756:10004:0620/191234:ERROR:application_service.cc(85)] Loading app from D:\win\xwalk1\WifiDirectEmpry
[12756:10004:0620/191234:ERROR:xwalk_platform_notification_service.cc(143)] NOT IMPLEMENTED
[12756:10004:0620/191234:ERROR:xwalk_browser_context.cc(87)] Failed to read preference, error num: 0
[12756:10004:0620/191234:ERROR:xwalk_platform_notification_service.cc(143)] NOT IMPLEMENTED
[6560:11852:0620/191234:WARNING:histogram_base.cc(131)] 2 histograms were created before reporting was enabled.
[6560:11988:0620/191234:FATAL:ipc_channel_reader.cc(291)] Check failed: broker.
Backtrace:
base::debug::StackTrace::StackTrace [0x00000001405074D6+54] (d:\win\xwalk\src\base\debug\stack_trace_win.cc:215)
logging::LogMessage::~LogMessage [0x00000001403F2649+89] (d:\win\xwalk\src\base\logging.cc:520)
IPC::internal::ChannelReader::GetBrokeredAttachments [0x0000000148A0ABCA+522] (d:\win\xwalk\src\ipc\ipc_channel_reader.cc:292)
+ [{image_id_=1520 src_rect_={origin_={x_=0 y_=0 } size_={width_=344 height_=604 } } target_size_={width_=...} ...}] ({image_id_=1520 src_rect_={origin_={x_=0 y_=0 } size_={width_=344 height_=604 } } target_size_={width_=...} ...}, ({image_id_=1520 src_rect_={origin_={x_=0 y_=0 } size_={width_=344 height_=604 } } target_size_={width_=...} ...}, unique_ptr {locked_=false image_info_={fWidth=344 fHeight=604 fColorType=kBGRA_8888_SkColorType (5) ...} memory_=...})) std::pair<cc::ImageDecodeControllerKey const ,std::_List_iterator<std::_List_val<std::_List_simple_types<std::pair<cc::ImageDecodeControllerKey,std::unique_ptr<cc::SoftwareImageDecodeController::DecodedImage,std::default_delete<cc::SoftwareImageDecodeController::DecodedImage> > > > > > >
+ [{image_id_=350 src_rect_={origin_={x_=0 y_=0 } size_={width_=344 height_=604 } } target_size_={width_=...} ...}] ({image_id_=350 src_rect_={origin_={x_=0 y_=0 } size_={width_=344 height_=604 } } target_size_={width_=...} ...}, ({image_id_=350 src_rect_={origin_={
@astojilj
astojilj / gist:fbecf7a901a46d774eb9c0253a18eb4c
Created May 7, 2016 06:45
BitmapImage::resetAnimation() call stack
> chrome_child.dll!blink::BitmapImage::resetAnimation() Line 550 C++
chrome_child.dll!blink::ImageResource::allClientsAndObserversRemoved() Line 213 C++
chrome_child.dll!blink::Resource::didRemoveClientOrObserver() Line 692 C++
chrome_child.dll!blink::ImageResource::removeObserver(blink::ImageResourceObserver * observer) Line 158 C++
chrome_child.dll!blink::ImageLoader::invokePreFinalizer(void * object) Line 48 C++
chrome_child.dll!blink::ThreadState::invokePreFinalizers() Line 1395 C++
chrome_child.dll!blink::ThreadState::preSweep() Line 999 C++
chrome_child.dll!blink::ThreadState::leaveSafePoint(blink::SafePointAwareMutexLocker * locker) Line 1241 C++
chrome_child.dll!blink::ThreadHeap::collectGarbage(blink::BlinkGC::StackState stackState, blink::BlinkGC::GCType gcType, blink::BlinkGC::GCReason reason) Line 566 C++
chrome_child.dll!blink::ThreadState::performIdleGC(double deadlineSeconds) Line 731 C++
@astojilj
astojilj / gist:d23b1e6a9ebbecce46f65adaf8f2c6b2
Created May 3, 2016 20:40
when it is needed to use m_actualDecoder in(m_allDataReceived || (m_actualDecoder && m_actualDecoder->frameIsCompleteAtIndex(index)));
m_allDataReceived is false, m_actualDecoder is not null and m_actualDecoder->frameIsCompleteAtIndex(index) returns false for first frame.
> chrome_child.dll!blink::DeferredImageDecoder::createFrameImageAtIndex(unsigned int index, bool knownToBeOpaque) Line 321 C++
chrome_child.dll!blink::DeferredImageDecoder::createFrameAtIndex(unsigned int index) Line 119 C++
chrome_child.dll!blink::ImageSource::createFrameAtIndex(unsigned int index) Line 112 C++
chrome_child.dll!blink::BitmapImage::cacheFrame(unsigned int index) Line 144 C++
chrome_child.dll!blink::BitmapImage::frameAtIndex(unsigned int index) Line 339 C++
chrome_child.dll!blink::BitmapImage::currentFrameIsLazyDecoded() Line 401 C++
chrome_child.dll!blink::GraphicsContext::computeFilterQuality(blink::Image * image, const blink::FloatRect & dest, const blink::FloatRect & src) Line 821 C++
chrome_child.dll!blink::GraphicsContext::drawImage(blink::Image * image, const blink::FloatRect & dest, const blink::FloatRect & src, SkXfermode::Mode op, bl
@astojilj
astojilj / gist:398376efd9094af1ebf2
Created January 27, 2016 14:17 — forked from WarheadsSE/gist:40ffb90a36dd8727db97
wpa_supplicant.interface introspection
<?xml version="1.0"?>
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.freedesktop.DBus.Introspectable">
<method name="Introspect">
<arg name="data" type="s" direction="out"/>
</method>
</interface>
<interface name="org.freedesktop.DBus.Properties">
<method name="Get">
C:\xwalk\src>python xwalk/gyp_xwalk
Enabled Psyco JIT.
Traceback (most recent call last):
File "xwalk/gyp_xwalk", line 375, in <module>
sys.exit(main())
File "xwalk/gyp_xwalk", line 262, in main
gyp_environment.SetEnvironment()
File "C:\xwalk\src\build\gyp_environment.py", line 18, in SetEnvironment
gyp_helper.apply_chromium_gyp_env()
File "C:\xwalk\src\build\gyp_helper.py", line 68, in apply_chromium_gyp_env
C:\xwalk\src>ninja -C out\Debug_x64 xwalk
ninja: Entering directory `out\Debug_x64'
[6/14276] CXX obj\v8\src\base\utils\v8_libbase.random-number-generator.obj
FAILED: ninja -t msvc -e environment.x64 -- "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\cl.exe" /nologo /showIncludes /FC @obj\v8\src\base\utils\v8_libbase.random-number-generator.obj.rsp /c ..\..\v8\src\base\utils\random-number-generator.cc /Foobj\v8\src\base\utils\v8_libbase.random-number-generator.obj /Fdobj\v8\tools\gyp\v8_libbase.cc.pdb
cl : Command line warning D9002 : ignoring unknown option '/arch:SSE2'
c:\xwalk\src\v8\src\base\build_config.h(132): fatal error C1189: #error: Target architecture ia32 is only supported on ia32 host
[6/14276] ACTION Generating resources from ../webui/resources/webui_resources.grd
ninja: build stopped: subcommand failed.
C:\xwalk\src>out\Debug\xwalk.exe --enable-logging --v=1 '"C:\Program Files\usecase-webapi-xwalk-tests\usecase-webapi-xwalk-tests\manifest.windows.json"
C:\xwalk\src>[8096:7560:0126/152723:INFO:skopts.cpp(86)] sse 4.2 detected
[8096:7560:0126/152723:INFO:skopts.cpp(88)] avx2 detected
[8096:7560:0126/152723:ERROR:xwalk_platform_notification_service.cc(103)] NOT IMPLEMENTED
[8096:7560:0126/152723:VERBOSE1:media_stream_manager.cc(450)] ~MediaStreamManager
[8096:7560:0126/152723:VERBOSE1:notification_service_impl.cc(145)] 1 notification observer(s) leaked of notification type 14
[8096:7560:0126/152723:VERBOSE1:xwalk_runner.cc(56)] Destroying XWalkRunner object.