Skip to content

Instantly share code, notes, and snippets.

View maropu's full-sized avatar
🌴
On vacation

Takeshi Yamamuro maropu

🌴
On vacation
View GitHub Profile
@discdiver
discdiver / jupyterlab_shortcuts.md
Last active June 10, 2024 07:28
Common Jupyter Lab Keyboard Shortcuts

If you are on a Mac, substitute command for control. Don't type the + (it means press both keys at once).

Shortcuts when in either command mode (outside the cells) or edit mode (inside a cell):

  • Shift + Enter run selected cell or cells - if no cells below, insert a code cell below

  • Ctrl + B toggle hide/show left sidebar

  • Ctrl + S save and checkpoint

  • Ctrl + Shift + S save as

import java.util.Random;
import sun.misc.Unsafe;
import sun.nio.ch.DirectBuffer;
import java.lang.reflect.Field;
import java.nio.ByteBuffer;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
@repeatedly
repeatedly / msgpack_issue_121.md
Last active November 30, 2021 02:09
MessagePackが文字列とバイナリをわけないのは問題?

MessagePackが文字列とバイナリをわけないのは問題?

msgpack/msgpack#121

Objective Cの実装使ってるとある問題にぶちあたった.なので,文字列をちゃんとバイナリ(Raw)と分けるべき,という提案

(*) 俺は熟読したわけではないので,中身が気になる人はちゃんと本スレを読みましょう

そもそもMessagePackとは

@oza
oza / impala_be_node.md
Created October 28, 2012 23:36
Impala BE Note

Impala BE メモ

本文章は,Impala のメモ の TODO のうち,BackEnd の特にクエリの実行部を読み,文章化したものである.

概要

BackEnd(BE) は単体のデーモンとして動作し,FE 側でパースした結果(Job ID/Plan)に基づいて処理を実行する.FE と BE のやりとりには Thrift が用いられている.

|FE| - パース結果(Job ID/実行Planなど) thrift -> |BE|

なんかClouderaが出したらしい.Hiveと違ってMapReduceをやらず,独自のクエリエンジンを使っている.場合によっては10x以上速くなるらしい.GoogleのDremelに触発されて2年かけて作ってたらしい.

構成

Frontend / Backendのサーバが2種類.FrontendがBeeswax経由でWebから叩けたりする.BackendはHDFSとかのデータノード上でクエリとかを実行するやつだと思われる(2.の実行エンジン辺り?).

ソース

主要なディレクトリはcommon, be(backend), fe(fronend)の3つ.

@hellerbarde
hellerbarde / latency.markdown
Created May 31, 2012 13:16 — forked from jboner/latency.txt
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs

@jboner
jboner / latency.txt
Last active July 7, 2024 21:35
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@rednaxelafx
rednaxelafx / .hotspot_compiler
Created March 6, 2012 13:18
Example (XS) of adding an intrinsic method to HotSpot C2. Patch against HS20-b12
exclude Main main
dontinline Main doTest
compileonly Main doTest
compileonly FxIntrinsics *
@dabrahams
dabrahams / private_access.cpp
Created December 28, 2011 17:50
Accessing Private Data
#include <iostream>
// This is a rewrite and analysis of the technique in this article:
// http://bloglitb.blogspot.com/2010/07/access-to-private-members-thats-easy.html
// ------- Framework -------
// The little library required to work this magic
// Generate a static data member of type Tag::type in which to store
// the address of a private member. It is crucial that Tag does not