This file contains hidden or 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
#To use this you must supply: | |
#a cohort_id number | |
#an output datafile ('something.csv') | |
#the api_key to access the database | |
#for example: | |
#raw_data_file <- "Raw MRI Data.csv" | |
#cohort_id <- 35 | |
#api_key <- 'SEE SLACK FOR THE API KEY' |
This file contains hidden or 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(rtweet) #rtweet API creds should already be set up | |
library(stringi) | |
library(dplyr) | |
friends = get_friends(user="noamross") | |
followers = get_followers("noamross") | |
tweeps_id = distinct(bind_rows(friends, followers)) | |
tweeps_info = lookup_users(tweeps_id$user_id) | |
# A regex for a visit to Durham |
This file contains hidden or 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
class LoginRequiredMixin(object): | |
""" | |
View mixin which requires that the user is authenticated. | |
""" | |
@method_decorator(login_required) | |
def dispatch(self, request, *args, **kwargs): | |
return super(LoginRequiredMixin, self).dispatch( | |
self, request, *args, **kwargs) |
This file contains hidden or 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
My first examples with [***knitr***](http://yihui.name/knitr/) | |
----------------------------------------- | |
Let's include some simple R code: | |
```{r} | |
1+2 | |
``` | |
That worked. | |
Let's include a plot: | |
```{r fig.width=4, fig.height=4} |
This file contains hidden or 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
Remove ._*- and .AppleDouble-files from folders. | |
Adapted from Torkel's comment on http://hints.macworld.com/article.php?story=20021118060850652 | |
Cred to hiber for suggesting adding -print0/-0 to solve whitespace issue. | |
See all ._*-files: | |
find . -name '._*' | more | |
Remove all ._*-files: | |
find . -name '._*' -print0 | xargs -0 rm |
This file contains hidden or 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
<?xml version='1.0' encoding="ISO-8859-1"?> | |
<xsl:stylesheet | |
xmlns:xsl='http://www.w3.org/1999/XSL/Transform' | |
version='1.0' | |
> | |
<xsl:param name="layout">ref</xsl:param> | |
<!-- | |
Author: |