Skip to content

Instantly share code, notes, and snippets.

View myui's full-sized avatar

Makoto YUI myui

View GitHub Profile
#
# 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
/*
* 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 / dynamo_lr.md
Last active February 5, 2018 04:46

予測モデルの作成 (毎日 過去2-3週間分でモデルを作成)

WITH train_input as (
	select
		array_concat(
			array('bias'),
			categorical_features(
				'hour', 'week',
 hour, week

Preparation

Install required softwares

GPG and Maven, JDK 7 is mandatory for verification

brew install gpg gpg-agent pinentry-mac
brew install maven
brew install md5sha1sum
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>
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
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')}
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
@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