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
import Data.Vector.Unboxed as VU | |
-- linear algebra | |
-- add | |
(<+>) :: Vector Double -> Vector Double -> Vector Double | |
(<+>) x y = VU.zipWith (+) x y | |
-- sub | |
(<->) :: Vector Double -> Vector Double -> Vector Double | |
(<->) x y = VU.zipWith (-) x y |
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
import System.Random.Mersenne | |
import Control.Parallel.Strategies hiding (parMap) | |
nt = 4 -- number of thread | |
np = 1000000 -- number of photon | |
tau = 1.0 -- cloud optical thickness | |
sal = 0.5 -- surface albedo | |
omg = 1.0 -- single scattering albedo |
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
import System.Random.Mersenne | |
np = 1000000 | |
tau = 1.0 -- cloud optical thickness | |
sal = 0.5 -- surface albedo | |
omg = 1.0 -- single scattering albedo | |
zu = tau -- atmosphere upper boundary | |
zb = 0.0 -- atmosphere lower boundary |
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
import System.Random.Mersenne | |
np = 1000000 | |
tau = 1.0 -- cloud optical thickness | |
sal = 0.5 -- surface albedo | |
omg = 1.0 -- single scattering albedo | |
zu = tau -- atmosphere upper boundary | |
zb = 0.0 -- atmosphere lower boundary |
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
module Main exposing (..) | |
import Html exposing (..) | |
import Html.Events exposing (..) | |
import Html.Attributes exposing (..) | |
type alias Model = Int | |
type Msg = Click |
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
type ZipList = [(Double, Double)] | |
-- akima interpolation | |
akimaint :: ZipList -> Double -> Maybe Double | |
akimaint zls x = akimacore zls' x | |
where | |
zls' = zlistsort zls | |
zls'' = selzls zls' n n2 | |
xls = map fst zls' |
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
\begin{figure}[htbp] | |
\centering | |
\tikzset{% | |
every channel/.style={ | |
rectangle, | |
draw, | |
draw=black, | |
fill=white, | |
minimum size=1cm, | |
}, |
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/sh | |
CMDNAME=`basename $0` | |
BASE_DIR=$(cd $(dirname $0);pwd) | |
image_list=(${BASE_DIR}/*.jpg) | |
numimglist=${#image_list[@]} | |
rannum=$(( $RANDOM % ${numimglist})) | |
image_path=${image_list[$rannum]} |
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
# -*- coding: utf-8 -*- | |
# hist_gp.rb | |
# | |
# Author: Rintaro Okamura | |
# | |
# Description: | |
# Histogram libraries for ruby using gnuplot gem | |
# |
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
\documentclass[a4j, 12pt, titlepage]{ltjreport} | |
%\documentclass[a4j, 12pt, titlepage]{jreport} | |
\usepackage[top=20truemm,bottom=20truemm,left=20truemm,right=20truemm]{geometry} | |
\usepackage{graphicx} | |
\usepackage{tikz} | |
\usetikzlibrary{automata,positioning} | |
\makeatletter |