Skip to content

Instantly share code, notes, and snippets.

@lolow
lolow / install-sharelatex.md
Last active March 10, 2017 15:53
how to install and setup sharelatex on ubuntu 16.04

dependencies

database and stuff

sudo apt-get update
sudo apt-get install -y redis-server
sudo apt-get install -y mongodb

docker

sudo apt-get install -y apt-transport-https ca-certificates
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D

@lolow
lolow / seafile-merge-fixer.py
Created June 6, 2016 20:04 — forked from nyanpasu64/seafile-merge-fixer.py
Seafile merge fixer (replace remote with local state by renaming files)
#!/usr/bin/env python3
import os
import sys
import re
import shutil
from pathlib import Path
# Test of Significance, takes the same arguments as t.test() .
signif.test <- function(x, ...) {
p <- t.test(x, ...)$p.value
# List of p excuses retrieved from http://mchankins.wordpress.com/2013/04/21/still-not-significant-2/
p_excuses <- c(
"(barely) not statistically significant <p>",
"a barely detectable statistically significant difference <p>",
"a borderline significant trend <p>",
"a certain trend toward significance <p>",

RStudio developers are really hard working. Somehow in their spare time they have worked on their shiny package for making interactive web pages. This gist compares writing a shiny web app to writing a similar app using gWidgetsWWW2.rapache. We only look here at the code, not the deployment. In general, deploying a shiny app widely seems best suited for RStudio's service, currently in beta, though clearly a local shiny app is also quite useful. Deploying an app under gWidgetsWWW2.rapache is fairly easy -- though not very widely tested.

We follow the tkdensity.R GUI from the tcltk package for comparison. This is a standard example with some controls and a resulting graphic. It is right up shiny's alley. We compare to the manipulate commands which mimic RStudio's manipulate pacakge and to straight gWidgetss:

There are 4 files:

  • a file showing how to do this with manipulate (this is an example from the gWidgetsWWW2.rapache package)
  • a file showing gWidgetsWWW2.rapache style (both have a w
# Download cygwin setup.exe from http://www.cygwin.com/setup.exe and install with wget package.
#
# Run cygwin.bat with Administrator rights
cd /tmp
wget http://apt-cyg.googlecode.com/svn/trunk/apt-cyg
chmod +x apt-cyg
mv apt-cyg /bin/apt-cyg
# make local disk mounts available under root (instead of /cygdrives)