Skip to content

Instantly share code, notes, and snippets.

View syu-id's full-sized avatar

Shaoyun Yu syu-id

  • The Hong Kong Polytechnic University
  • Hong Kong SAR
View GitHub Profile
@syu-id
syu-id / mi-zsh-prpt.zsh
Created May 10, 2013 01:38
A minimalistic Zsh prompt, with a reverse ordered current working directory on the right-hand side, and a vi normal mode indicator.
# load colors
autoload -U colors
colors
PROMPT="%{$fg_bold[white]%}%#%{$reset_color%} "
# RPROMPT vi mode indicator
VI_INDICATOR="%{$fg_bold[blue]%}vi%{$reset_color%}"
revpwd() {
@syu-id
syu-id / upeditor.PKGBUILD.sh
Last active January 2, 2016 09:19
archlinux aur/upeditor fix: use the right name for i686 installer
# Maintainer: Yangtse Su<yangtsesu@gmail.com>
pkgname=upeditor
pkgver=1.0
pkgrel=2
pkgdesc='unionpay security control plugin'
url='https://online.unionpay.com/'
arch=('i686' 'x86_64')
license=('unknown')
depends=('openssl')
@syu-id
syu-id / hub.PKGBUILD.sh
Created January 21, 2014 07:49
PKGBUILD for hub 1.11.1
# $Id$
# Maintainer: Daniel Wallace <danielwallace at gtmanfred dot com>
# Contributor: Alfredo Palhares <masterkorp@masterkorp.net>
pkgname=hub
pkgver=1.11.1
pkgrel=1
pkgdesc="cli interface for Github"
arch=('any')
url="http://hub.github.com/"
@syu-id
syu-id / 20-dns.conf
Created January 21, 2014 09:36
Android DNS configuration: use Google Public DNS; file: /system/etc/dhcpcd/dhcpcd-hooks/20-dns.conf; source: - http://blog.varunkumar.me/2010/09/how-to-change-dns-server-on-android.html - http://varun-scratchpad.googlecode.com/svn/trunk/static/20-dns.conf
# Set net.<iface>.dnsN properties that contain the
# DNS server addresses given by the DHCP server.
set_dns_props()
{
case "${new_domain_name_servers}" in
"") return 0;;
esac
count=1
@syu-id
syu-id / gset.yaml
Created January 24, 2014 12:51
my gnome settings in yaml
# vim: ft=yaml fdm=marker
# desc: gnome settings
general: #{{{1
- schema: org.gnome.settings-daemon.plugins.power
setting:
percentage-low: 15
percentage-critical: 10
percentage-action: 6
use-time-for-policy: false
@syu-id
syu-id / questionnaire.log
Created May 8, 2015 07:18
Stamp fails when using the \makenodeinlasttextbox hack
This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian) (format=pdflatex 2015.1.1) 8 MAY 2015 16:09
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**questionnaire.tex
(/mnt/data/tmp/q3/t/questionnaire.tex
LaTeX2e <2011/06/27>
Babel <3.9h> and hyphenation patterns for 78 languages loaded.
(/mnt/data/tmp/q3/t/sdaps.cls
Document Class: sdaps 2013/03/10v1.0 Class for composing questionairs for SDAPS
@syu-id
syu-id / LC-2015.11.13.R
Last active November 26, 2015 13:54
学習者コーパス論 2015.11.13 宿題
library(magrittr)
library(stringr)
# read in all the files
files_nns <- list.files('NICE3.0/NICE-NNS', full = TRUE)
files_ns <- list.files('NICE3.0/NICE-NS', full = TRUE)
nns <- lapply(files_nns, scan, what = 'char', sep = '\n', fileEnc = 'cp932')
ns <- lapply(files_ns, scan, what = 'char', sep = '\n', fileEnc = 'cp932')
@syu-id
syu-id / LC-2015.11.20.R
Last active November 27, 2015 02:02
学習者コーパス論宿題 2015.11.20
library(tidyr)
library(dplyr)
library(stringr)
dirs <- c(
'NICE3.0/NICE-NNS',
'NICE3.0/NICE-NS'
)
data_raw <- dirs %>%
@syu-id
syu-id / 2015.11.30-nishizaka
Last active November 30, 2015 11:17
2015.11.30-nishizaka
## 効果量について
### 分散分析の効果量
被験者内計画の分散分析の効果量である「一般化オメガ二乗($\omega_G^2$)」と「一般化イータ二乗($\eta_G^2$)」の解釈は、水本篤・竹内理 (2008)「研究論文における効果量の報告のために―基本的概念と注意点」『英語教育研究』31, 57–66. (http://www.mizumot.com/files/EffectSize_KELES31.pdf ) の表1(p. 62)に従いました。後の説明の部分では、$\omega_G^2$ を使いました。
サイズ | $\eta_G^2$ | $\omega_G^2$
------|------------|-------------
小 | $.01$ | $.01$
中 | $.06$ | $.09$
library(tidyr)
library(dplyr)
library(stringr)
# preparations ----
dirs <- list.files('NICE/NICE_3.0.1b', full = TRUE)
files <- dirs %>% list.files(full = TRUE)
writers <- dirs %>% list.files() %>% str_replace('\\.txt$', '')