Skip to content

Instantly share code, notes, and snippets.

View myui's full-sized avatar

Makoto YUI myui

View GitHub Profile

Data preparation

-- set mapred.max.split.size=128000000;
set hive.input.format=org.apache.hadoop.hive.ql.io.CombineHiveInputFormat;
set hive.tez.input.format=org.apache.hadoop.hive.ql.io.CombineHiveInputFormat;
set hive.mapjoin.smalltable.filesize=30000000;
-- set hive.optimize.s3.query=true;
set hive.exec.dynamic.partition.mode=nonstrict; 
set hive.optimize.sort.dynamic.partition=false;
@myui
myui / terminal.json
Last active December 7, 2017 05:43
karabiner elements
{
"title": "CTRL <=> CMD except Terminal and Emacs",
"rules": [
{
"description": "Swap ctrl and command except Terminal and Emacs",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "left_control",
@myui
myui / FastInverseSquareRootTest.java
Last active October 20, 2017 07:03
FastInverseSquareRootTest
public class FastInverseSquareRootTest {
private static FastInverseSquareRootTest conductTestHalfPrecision() {
float result = 0F;
long startTime, endTime, midTime;
startTime = System.nanoTime();
for (float x = 1F; x < 4_000_000F; x += 0.25F) {
result += 1F / (float) Math.sqrt(x);
}
midTime = System.nanoTime();
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
@myui
myui / Throwing.java
Created October 23, 2017 10:15
Throw Exceptions in Consumer in Java 8
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
function validate_date() {
if [[ $1 =~ ^[0-9]{4}/[0-9]{2}/[0-9]{2}$ ]]; then
return 0
else
return 1
fi
}
while true; do
echo
timezone: Asia/Tokyo
+task1:
echo>: ${moment(session_time).format()}
+task2:
echo>: ${moment(session_time).subtract(1,'months').format('YYYYMM')}
+task3:
echo>: ${moment(session_time).subtract(7,'days').format('YYYYMMDD')}
brew install gcc cmake maven
git clone --depth 1 --single-branch -b master --recursive https://github.com/dmlc/xgboost
cd xgboost
cp make/config.mk ./config.mk
export CC=gcc-7
export CXX=g++-7
make -j4
diff --git a/pom.xml b/pom.xml
index 41fac521..b464ddeb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -522,6 +522,39 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>