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
# An alternative implementation of the MATTR algorithm in R | |
# author: Shaoyun YU <eric.rongmu@gmail.com> | |
# ref: Covington & Mcfall (2010) Cutting the Gordian Knot: The Moving-Average Type-Token Ratio | |
# usage: mattr(vector_of_tokens, window_size) | |
window_types <- function(i_start, win_size, data) { | |
i_end <- i_start + win_size - 1 | |
win <- data[i_start:i_end] |
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
# 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 |
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
# 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 |
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
# $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/" |
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
# 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') |
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
library(dplyr) | |
library(ggplot2) | |
library(scales) | |
df <- read.csv('out/2015.12.04-awl_asl.csv') | |
df_plot <- df %>% | |
mutate( | |
native = plyr::revalue(native, c(en = 'L1 English ', ja='L1 Japanese')) |
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
library(dplyr) | |
library(ggplot2) | |
df <- read.csv('out/2015.12.04-awl_asl.csv') | |
df_plot <- df %>% | |
mutate( | |
native = plyr::revalue(native, c(en = 'L1 English ', ja='L1 Japanese')) | |
) |
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
# 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() { |
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
トークン数と TTR について少し数学的に考えてみると、プロットの結果が当たり前のことです。 | |
トークン数とタイプ数は線形的な関係にあると仮定します。 | |
$$ | |
type = \beta_0 + \beta_1 \cdot token | |
$$ | |
$token = 1$ の場合、$type=1$ になるので、$\beta_0$ と $\beta_1$ の和が $1$ に決まっています。 |
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
library(dplyr) | |
tokens <- read.csv('data/tokens.csv', as.is = TRUE) | |
result <- tokens %>% | |
group_by(native, id) %>% | |
summarise( | |
n_token = n(), | |
n_type = n_distinct(token), |
NewerOlder