Search This Blog

Tuesday 8 November 2011

proxy and apt-get

There are numerous suggestions - presumably these vary on distribution.

The thing that worked for me with Ubuntu 10.04 LTS was editing /etc/apt/apt.conf.d/70debconf to add:

Acquire::http::proxy "http://proxysg.uwe.ac.uk:8080";
Acquire::ftp::proxy "ftp://proxysg.uwe.ac.uk:8080";

Wednesday 2 November 2011

mount blackboard locally

1. Set up webdav access to blackboard content

2. Install dav2fs

3. mkdir local_destination for remote files.

4. sudo mount -t davfs https://blackboard.uwe.ac.uk/lo/ca/tion/ local_destination

BINGO!

Monday 8 August 2011

initial analysis

There is no significant difference between the experimental treatment groups (anova, using R's aov method) when looking at percentage change in weekly use by each user.

> aov1 <- aov(percentage~week_number*experimental_group, data=m[m$se_class=='low', names(m)])
> summary(aov1)
Df Sum Sq Mean Sq F value Pr(>F)
week_number 1 9185 9184.9 12.8365 0.0003446 ***
experimental_group 2 141 70.7 0.0988 0.9059019
week_number:experimental_group 2 1376 688.2 0.9617 0.3823317
Residuals 3443 2463570 715.5
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
> aov1 <- aov(percentage~week_number*experimental_group, data=m[m$se_class=='high', names(m)])
> summary(aov1)
Df Sum Sq Mean Sq F value Pr(>F)
week_number 1 12517 12516.9 17.8116 2.499e-05 ***
experimental_group 2 1199 599.5 0.8530 0.4262
week_number:experimental_group 2 379 189.5 0.2696 0.7637
Residuals 3592 2524243 702.7
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1


data analysis 1

This will be of no interest to anybody else.

I have sanity checked the R output from the CHARM analysis. So far, all data coming from the views of average use, and week on week percentage change coming from this, look good.


Saturday 7 May 2011

R data tricks : merging and joining

rbind and cbind join files respectively as if they were stacked on top of each other - bind by row - and as if they were placed side by side - bind by column.

merge allows you to join datasets on shared columns. remember to specify by = list of fields on which to join, and all=TRUE if you want to include rows in which no union took place.

Friday 6 May 2011

output CSV from mysql

1. Make sure you've got FILE permission

mysql> grant FILE on *.* to matt;

2. make sure mysql can write to the destination directory - I used /tmp

mysql> select 'hello world' into outfile '/tmp/destination.txt';

3. select your csv output
SELECT order_id,product_name,qty
FROM orders
INTO OUTFILE
'/tmp/destination.csv'
FIELDS TERMINATED BY
','
ENCLOSED BY
'"'
LINES TERMINATED BY
'\n';

restoring a mysql db from file

restoring a mysql db from file

mysql> create database charm;

$ mysql -u matt -D charm -p < charm.sql

mysql> grant all on charm.* to matt;