This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from pyspark.sql import SparkSession | |
from pyspark import SparkContext | |
from pyspark.sql import Row | |
from pprint import pprint | |
import sys | |
reload(sys) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
MID_CASE=in-gen-mid.txt | |
SIGMA_V_CASE=in-gen-sigma-v.txt | |
SIGMA_W_CASE=in-gen-sigma-w.txt | |
# meet in the mid | |
# 1 <= N <= 30 | |
# 1 <= W <= 10^9 | |
N1=$((RANDOM%30)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns mmd-clj.pmd | |
(:use | |
[org.clojars.smee.binary.core])) | |
(def pmd-header | |
;; ヘッダファイル | |
(compile-codec | |
(ordered-map | |
:header | |
(ordered-map |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vagrant.configure("2") do |config| | |
config.vm.box = "mvbcoding/awslinux" | |
config.vm.box_version = "2017.03.0.20170401" | |
config.vm.network "forwarded_port", guest: 80, host: 80 | |
# deploy codes | |
config.vm.provision "shell", privileged: false, inline: <<-SHELL | |
whoami #=> vagrant | |
echo $HOME #=> /home/vagrant |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM amazonlinux | |
# set yum repository mirror for jp | |
RUN yum -y install yum-plugin-fastestmirror | |
RUN sed -ri 's/#include_only=.nl,.de,.uk,.ie/include_only=.jp/g' /etc/yum/pluginconf.d/fastestmirror.conf | |
# install packages | |
RUN yum -y update | |
RUN yum -y install vim | |
RUN yum -y install passwd openssh openssh-server openssh-clients sudo iproute |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lines = <<'EOS' | |
3 | |
2 | |
4 | |
8 | |
EOS | |
#lines = $stdin.read | |
array = lines.split("\n") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<head> | |
<title>ビルド状況</title> | |
<style type="text/css"> | |
body | |
{ | |
margin: 0px; | |
padding: 15px; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- | |
-- 単純な文字列結合の関数 String#join() 相当? | |
-- | |
DROP FUNCTION IF EXISTS concat_as_ymd; | |
CREATE FUNCTION concat_as_ymd(ymd VARCHAR(8)) RETURNS VARCHAR(10) DETERMINISTIC | |
BEGIN | |
RETURN CONCAT_WS('-', SUBSTRING(ymd, 1, 4), SUBSTRING(ymd, 5, 2), SUBSTRING(ymd, 7, 2)); | |
END; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OUTPUT_FORMAT("binary"); | |
SECTIONS | |
{ | |
.head 0x0 : { | |
LONG(64 * 1024) /* 0 : stack+.data+heap の大きさ(4KBの倍数) */ | |
LONG(0x69726148) /* 4 : シグネチャ "Hari" */ | |
LONG(0) /* 8 : mmarea の大きさ(4KBの倍数) */ | |
LONG(0x310000) /* 12 : スタック初期値&.data転送先 */ | |
LONG(SIZEOF(.data)) /* 16 : .dataサイズ */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SECTIONS { | |
/* | |
* .bimのヘッダ | |
*/ | |
.head 0x0 : | |
{ | |
/* | |
* GNU ld version 2.14.90.0.7 20031029では、以下は、なぜか'+ 0'が必要。 | |
* LOADADDR(.text) | |
* ADDR(.text) |