Skip to content

Instantly share code, notes, and snippets.

View kishiyamat's full-sized avatar
🏠
Working from home

kishiyamat (Takeshi Kishiyama) kishiyamat

🏠
Working from home
View GitHub Profile
@kishiyamat
kishiyamat / pandoc_highlighting.tex
Last active January 19, 2018 01:56 — forked from cormacrelf/gist:3760427
Pandoc Markdown -> latex with syntax highlighting
\usepackage{amssymb,amsmath}
\usepackage{ifxetex,ifluatex}
\ifxetex
\usepackage{fontspec,xltxtra,xunicode}
\defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
\newcommand{\euro}{€}
\else
\ifluatex
\usepackage{fontspec}
\defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
@kishiyamat
kishiyamat / ref.bib
Last active April 21, 2018 02:29
岸山のbibtexファイルです。基本はgoogle scholarの出力を貼り付けます。
@article{allopenna1998419,
title={Tracking the Time Course of Spoken Word Recognition Using Eye Movements: Evidence for Continuous Mapping Models},
journal={Journal of Memory and Language},
volume={38},
number={4},
pages={419--439},
year={1998},
note={},
issn={0749-596X},
doi={http://dx.doi.org/10.1006/jmla.1997.2558},
\usepackage[top=2cm, bottom=3cm, left=2cm, right=2cm]{geometry}
\newlength{\abstractwidth}
\setlength{\abstractwidth}{15cm}
\renewcommand{\baselinestretch}{0.9}
\pagestyle{empty}
\thispagestyle{empty}
var timeline = [];
// 実験リストは "JSON" 形式で記述する。Pythonを使うとcsv形式を埋め込める。
// ランダマイズなどもできるが、その際は情報を渡さないと面倒になる。
var practice_prod_list = [
{type: "production", item_id: -1, read: "銀河", },
{type: "production", item_id: -2, read: "アップル"},
];
var instructions_prod = {
var axb_instructions_practice = {
type: 'html-keyboard-response',
choices: [' '],
stimulus: `
<p> この弁別実験の各課題では a -> x -> b という順序で 3つの音を聞いてもらい、
2つ目の音(x)が似ているのが
(a)1つ目の音か (b)3つ目の音か を a か b のキーで答えてもらいます。
静かな環境で、可能な場合はイヤホンなどの装着をお願いいたします。
スペースキーを押すと練習課題を1問呈示いたします。
</p>
var axb_instructions_practice = {
type: 'html-keyboard-response',
choices: [' '],
stimulus: `
<p> この弁別実験の各課題では a -> x -> b という順序で 3つの音を聞いてもらい、
2つ目の音(x)が似ているのが
(a)1つ目の音か (b)3つ目の音か を a か b のキーで答えてもらいます。
静かな環境で、可能な場合はイヤホンなどの装着をお願いいたします。
スペースキーを押すと練習課題を1問呈示いたします。
</p>
library(tidyr)
library(dplyr)
library(stringr)
min_sd_fctr_grp <- function(model, replace_table) {
# replace_table は src に 変数名レベル、tgtに変数名を持つdf
min_sd <- as.data.frame(VarCorr(model)) %>%
filter(is.na(var2) & var1 != "(Intercept)") %>%
select(c(grp, var1, sdcor)) %>%
arrange(sdcor) %>%
var jsPsych = initJsPsych({
use_webaudio: false,
on_finish: function() {
jsPsych.data.displayData();
}
});
// TODO: timeline_variables は事前に読み込んでいる ことを前提とします。
var list_audio_preload = timeline_variables.map(
function(obj) {return [obj.sound]; }).flat(1);
PennController.ResetPrefix(null); // Shorten command names (keep this line here))
// DebugOff() // Uncomment this line only when you are 100% done designing your experiment
// NOTE: Empty project からではなく Self-Paced Reading を選択してから作業する
// これは PennController.js が機能しないため。もしEmptyから作成したい場合、以下をDLしてULする。
// https://github.com/PennController/penncontroller/blob/master/releases/2.0/PennController.js
// First show instructions, then experiment trials, send results and show end screen
Sequence("instructions", "experiment", SendResults(), "end")
// This is run at the beginning of each trial
PennController.ResetPrefix(null); // Shorten command names (keep this line here))
// DebugOff() // Uncomment this line only when you are 100% done designing your experiment
// NOTE: Empty project からではなく Self-Paced Reading を選択してから作業する
// これは PennController.js が機能しないため。もしEmptyから作成したい場合、以下をDLしてULする。
// https://github.com/PennController/penncontroller/blob/master/releases/2.0/PennController.js
// First show instructions, then experiment trials, send results and show end screen
Sequence("instructions", "experiment", SendResults(), "end")
// This is run at the beginning of each trial