- Intel Core i7-7500U CPU @ 2.70 GHz クアッドコア
- メモリ 16GB
- Ubuntu 16.10 yakkety (x86_64, 4.8.0-46-generic)
- GNU bash 4.3.46(1)-release (x86_64-pc-linux-gnu)
- grep (GNU grep) 2.25
- cat (GNU coreutils) 8.25
- go version go1.8 linux/amd64
配布されたプリントやLISのgithubのREADMEに書いてあることをそのままやってもいいんですが、罠があるので一応僕がやったことをメモっておきます。bashで作業してますが多分ほかのシェルでも大体同じです。
npmはnode.jsのためのパッケージマネージャです。
apt install nodejs npm
でもいいんですが、これからnode.jsで遊びたい人にはこれじゃ不便なので、nvmを使ってインストールします。apt使って入れる人は入れてから2.に移ってください。
nvmはnode.js自体のバージョンマネージャです。まずはnvmを入れましょう。nvmのGitHubにインストール方法が書いてあります。
.bashrc
に少し追記されるので. ~/.bashrc
するかbashを立ち上げ直す必要があることに注意です。
This file contains 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
:- dynamic memo/2. | |
:- retractall( (memo(_, _) ). | |
fib(N, 1) :- | |
N =< 2, !. | |
fib(N, Result) :- | |
memo(N, Result), !. | |
fib(N, Result) :- | |
N1 is N - 1, | |
fib(N1, Result1), |
This file contains 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
# Docker の ubuntu:16.04 に AArch64 用のクロスコンパイル環境をビルドする | |
# 2017/06/29 | |
# これ以外のファイルは、configure 時の出力ログです。 | |
# sudo docker run --name cross_compile -it ubuntu:16.04 /bin/bash | |
# Docker 環境のため、rootで動かしていることに注意してください。 | |
# 作業環境の整備 | |
apt update | |
apt upgrade |
This file contains 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
# Ubuntu 16.04 で AArch64 用のクロスコンパイル環境をつくる | |
# 2017/06/29 | |
# http://inaz2.hatenablog.com/entry/2015/12/01/204201 | |
# https://ja.stackoverflow.com/q/35941/19110 | |
# sudo docker run --name cross_compile2 -it ubuntu:xenial /bin/bash | |
apt update | |
apt upgrade | |
apt install build-essential texinfo gawk xz-utils lbzip2 perl wget emacs |
This file contains 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 上の ubuntu/xenial64 (20170626.0.0) に AArch64 用のコンパイラをビルドする | |
# 2017/07/01 | |
# Ansible 環境が無かったので手でインストール | |
sudo apt update | |
sudo apt upgrade | |
sudo apt install g++ bison flex texinfo | |
sudo apt install make | |
# 確認 |
This file contains 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
Python 3.6.0 |Anaconda 4.3.1 (64-bit)| (default, Dec 23 2016, 12:22:00) | |
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> import numpy as np | |
>>> import pandas as pd | |
>>> test = pd.DataFrame(np.random.choice([0.0, 100.0], size=(4, 4))) | |
>>> test | |
0 1 2 3 | |
0 0.0 0.0 100.0 100.0 | |
1 100.0 100.0 0.0 100.0 |
This file contains 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
GHC=stack --resolver ghc-8.0.1 --install-ghc ghc --package random --package network -- -XFlexibleContexts | |
TARGETS=reversi-serv | |
TARGETC=reversi | |
SRCS=Play.hs Command.hs | |
all: $(TARGETS) $(TARGETC) | |
$(TARGETS): Server.hs $(SRCS) | |
$(GHC) -O --make -o $(TARGETS) Server.hs |
This file contains 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
root@fdd452650efa:~/smlsharp-3.3.0# PATH=/usr/lib/llvm-3.7/bin:$PATH ./configure --without-massivethreads | |
checking build system type... x86_64-pc-linux-gnu | |
checking host system type... x86_64-pc-linux-gnu | |
checking target system type... x86_64-pc-linux-gnu | |
checking for gcc... gcc | |
checking whether the C compiler works... yes | |
checking for C compiler default output file name... a.out | |
checking for suffix of executables... | |
checking whether we are cross compiling... no | |
checking for suffix of object files... o |
This file contains 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 -*- | |
# Docomoの雑談対話APIを使ってチャットできるスクリプト (Python 3) | |
# https://ja.stackoverflow.com/q/37648/19110 | |
import sys | |
import urllib.request | |
import json | |
import os |