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
""" | |
DrupalPasswordHasher | |
To use, put this in any app and add to your settings.py, something like this: | |
PASSWORD_HASHERS = ( | |
'django.contrib.auth.hashers.PBKDF2PasswordHasher', | |
'myproject.myapp.drupal_hasher.DrupalPasswordHasher', | |
'django.contrib.auth.hashers.PBKDF2SHA1PasswordHasher', | |
'django.contrib.auth.hashers.BCryptPasswordHasher', |
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
""" | |
Usage: python minimal_Python.py infile outfile | |
Programs output by this translator will run the same way as the original and | |
use only the characters: | |
()+1cehrx | |
The code is for entertainment only. Converting your code base to minimal Python | |
is not recommended. |
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
""" | |
barcode_splitter.py | |
Barcode splitter for fastq sequencing files, that matches using Levenshtein | |
distance. | |
USAGE: | |
python barcode_splitter.py reads.fastq index_reads.fastq barcodes.txt |
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(ggplot2) | |
library(shiny) | |
shinyServer(function(input, output) { | |
output$main_plot <- renderPlot({ | |
set.seed(205) | |
means = t(replicate(input$clusters, c(runif(1), runif(1)))) | |
means = cbind(1:input$clusters, means) | |
means = apply(means, 2, function(col) rep(col, input$points)) | |
means = data.frame(means) |
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(reshape2) | |
# used the query here: | |
# http://data.stackexchange.com/stackoverflow/query/213011/metrics-of-question-activity-over-time | |
dat = read.csv("permonth_data.csv") | |
dat = dat %>% mutate(Date=as.Date(paste(Year, Month, "15", sep="-"))) |
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
## "mer" methods for lme4.0, which couldn't be included in CRAN version | |
## of broom because it suggested lme4.0. See ?broom::lme4_tidiers for | |
## documentation. | |
tidy.mer <- function(x, effects = "random", ...) { | |
# pass directly on to lme4 method | |
effects <- match.arg(effects, c("random", "fixed")) | |
if (effects == "fixed") { | |
# return tidied fixed effects rather than random |
This file has been truncated, but you can view the full file.
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
GID YORF NAME GWEIGHT G0.05 G0.1 G0.15 G0.2 G0.25 G0.3 N0.05 N0.1 N0.15 N0.2 N0.25 N0.3 P0.05 P0.1 P0.15 P0.2 P0.25 P0.3 S0.05 S0.1 S0.15 S0.2 S0.25 S0.3 L0.05 L0.1 L0.15 L0.2 L0.25 L0.3 U0.05 U0.1 U0.15 U0.2 U0.25 U0.3 | |
GENE1331X A_06_P5820 SFB2 || ER to Golgi transport || molecular function unknown || YNL049C || 1082129 1 -0.24 -0.13 -0.21 -0.15 -0.05 -0.05 0.2 0.24 -0.2 -0.42 -0.14 0.09 -0.26 -0.2 -0.22 -0.31 0.04 0.34 -0.51 -0.12 0.09 0.09 0.2 0.08 0.18 0.18 0.13 0.2 0.17 0.11 -0.06 -0.26 -0.05 -0.28 -0.19 0.09 | |
GENE4924X A_06_P5866 || biological process unknown || molecular function unknown || YNL095C || 1086222 1 0.28 0.13 -0.4 -0.48 -0.11 0.17 0.31 0 -0.63 -0.44 -0.26 0.21 -0.09 -0.04 -0.1 0.15 0.2 0.63 0.53 0.15 -0.01 0.12 -0.15 0.32 0.16 0.09 0.02 0.04 0.03 0.01 -1.02 -0.91 -0.59 -0.61 -0.17 0.18 | |
GENE4690X A_06_P1834 QRI7 || proteolysis and peptidolysis || metalloendopeptidase activity || YDL104C || 1085955 1 -0.02 -0.27 -0.27 -0.02 0.24 0.25 0.23 0.06 -0.66 -0.4 -0.46 -0.43 0.18 |
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
snippet S3 | |
${1:funcname} <- function(${2:args}, ...) UseMethod("${1:funcname}") |
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
--- | |
title: "Effect of compression type and file complexity on saveRDS size and speed" | |
author: "David Robinson" | |
date: "April 20, 2015" | |
output: html_document | |
--- | |
```{r echo = FALSE} | |
knitr::opts_chunk$set(cache = TRUE, message = 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
library(plyr) | |
library(dplyr) | |
library(tidyr) | |
library(reshape2) | |
library(predpipe) | |
pipes_tidy <- pipes %>% | |
ldply(melt, .id = "path") %>% | |
rename(func = value, chain = L1) %>% |
OlderNewer