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
defmodule VercheckEx do | |
use Application | |
require HTTPoison | |
require Floki | |
require Timex | |
use Timex | |
def fetch_content() do | |
IO.puts("fetch_content") | |
receive do | |
{caller,url,type,i} -> |
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
defmodule VercheckEx do | |
use Application | |
use GenServer | |
require HTTPoison | |
require Floki | |
require Timex | |
use Timex | |
def fetch_content(params) do | |
{{url,type},i} = params | |
ret = HTTPoison.get!( url ) # urlで指定されるページのデータを取得 |
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
select count(*) from [nicodata_test.comment_data]; |
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
select | |
STRFTIME_UTC_USEC(date, '%Y-%m') AS dt, | |
count(*) | |
FROM [nicodata_test.comment_data] | |
GROUP BY dt ORDER BY dt DESC; |
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
defmodule TestProcess.Mixfile do | |
use Mix.Project | |
def project do | |
[app: :test_process, | |
version: "0.0.1", | |
elixir: "~> 1.0", | |
build_embedded: Mix.env == :prod, | |
start_permanent: Mix.env == :prod, | |
escript: escript, |
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
require Logger | |
defmodule KV do | |
def start_link do | |
Task.start_link(fn -> loop(%{}) end) | |
end | |
defp loop(map) do | |
receive do | |
{:get,key,caller} -> | |
send caller,{:get,:ok,Map.get(map,key)} | |
loop(map) |
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
defmodule ManyProcess do | |
def start_link(id) do | |
{:ok,spawn_link(fn -> loop(id,%{}) end)} | |
end | |
def loop(id,map) do | |
receive do | |
{:get,key,caller}-> | |
IO.puts "send id=#{id} key=#{key}" | |
send caller,Map.get(map,key) | |
loop(id,map) |
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
2015年 11月13日 金曜日 20時21分05秒 JST | |
Intel(R) Optimized LINPACK Benchmark data | |
Current date/time: Fri Nov 13 20:21:05 2015 | |
CPU frequency: 3.091 GHz | |
Number of CPUs: 1 | |
Number of cores: 2 | |
Number of threads: 4 |
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@ip-*-*-*-*:~/l_mklb_p_11.3.1.002/benchmarks_11.3.1/linux/mkl/benchmarks/linpack$ ./runme_xeon64 | |
This is a SAMPLE run script for SMP LINPACK. Change it to reflect | |
the correct number of CPUs/threads, problem input files, etc.. | |
./runme_xeon64: 37: [: -gt: unexpected operator | |
Fri Nov 13 11:26:24 UTC 2015 | |
Intel(R) Optimized LINPACK Benchmark data | |
Current date/time: Fri Nov 13 11:26:24 2015 | |
CPU frequency: 3.126 GHz |
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
# .bashrc | |
# Source global definitions | |
if [ -f /etc/bashrc ]; then | |
. /etc/bashrc | |
fi | |
# User specific aliases and functions | |
export LD_LIBRARY_PATH=/opt/intel/mkl/lib/intel64:/opt/intel/compilers_and_libraries/linux/lib/intel64:/home/ec2-use | |
r/prog/hpl-2.0_FERMI_v15/src/cuda:/usr/lib64/openmpi/lib |