Skip to content

Instantly share code, notes, and snippets.

View hyunsik's full-sized avatar
🏠
Working from home

Hyunsik Choi hyunsik

🏠
Working from home
View GitHub Profile
@hyunsik
hyunsik / sum_unrolled.c
Created April 3, 2013 18:44
sum_unrolled.c
int sum_unrolled( int n, int *a )
{
int sum = 0;
/* do the body of the work in a faster unrolled loop */
for( int i = 0; i < n/4*4; i += 4 )
{
sum += a[i+0];
sum += a[i+1];
sum += a[i+2];
@hyunsik
hyunsik / make_release
Last active December 26, 2015 18:09
A script to generate a Tajo release candidate
#!/bin/bash
if [ -z $1 ] || [ -z $2 ] || [ -z $3 ] || [ -z $4 ]; then
echo "usage: ../make_release src_dir tag_name version rc_num"
exit -1;
fi
cd $1
CANDIDATE_TAG=`git tag --list $2`
if [ -z $CANDIDATE_TAG ]; then
@hyunsik
hyunsik / gist:a0ac79fa4421e0bd7ad2
Created April 17, 2015 11:35
Transmute struct to bytes
use std::mem;
#[repr(packed)]
struct S4 {
a: u8,
b: [u8; 3],
}
#[repr(packed)]
struct S5 {
@hyunsik
hyunsik / gist:ef99bd8ada9ec7c7d29c
Last active February 6, 2019 14:05
Links for Rust
@hyunsik
hyunsik / FormatProperties.java
Last active August 29, 2015 14:21
FormatProperties
public interface FormatProperties {
boolean splittable();
boolean compressible();
boolean seekable();
boolean projectable();
boolean filterable();
@hyunsik
hyunsik / storage-setting.json
Created May 19, 2015 08:15
Storage configuration
{
"spaces": {
"default": {
"uri": "hdfs://localhost:8020/tajo/warehouse",
"configs": [
{"x": "y"},
{"x": "y"}
]
},
"ssd1": {
{
"pi": 3.141,
"happy": true,
"name": "Niels",
"nothing": null,
"answer": {
"everything": 42
},
"list": [1, 0, 2],
"object": {
@hyunsik
hyunsik / twitter_ddl.sql
Created May 21, 2015 07:56
twitter schema
CREATE EXTERNAL TABLE tweets (
coordinates TEXT,
favorited BOOL,
truncated BOOL,
created_at TIMESTAMP,
id_str TEXT,
/*entrities RECORD (
urls ARRAY<TEXT>
)*/
in_reply_to_user_id_str TEXT,