title | author | date |
---|---|---|
Working with Git |
Steph Locke |
15 September 2018 |
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
# Generate sample distributions | |
n = 1e2 | |
t = 3e6 | |
min_r = t/1000 | |
max_r = t/50 | |
c = 0 | |
r = vector(mode="numeric") | |
for(x in 1:n){ |
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
#setup | |
library(magick) | |
windowsFont("Roboto") | |
# inputs | |
setwd("c:/Users/steph/Dropbox/Locke Data/LoginCards/") | |
myfile <- "MiniBack.pdf" | |
n<-100 | |
# write.csv(data.frame(usernames=paste0("u",stringr::str_pad(1:n,pad = "0",width = 3)) | |
# ,pwords=random::randomStrings(n,len = 6,digits = FALSE,loweralpha = 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
yo |
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: "First dash" | |
output: | |
flexdashboard::flex_dashboard: | |
orientation: columns | |
vertical_layout: fill | |
runtime: shiny | |
--- | |
```{r setup, include=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(rtweet) #rtweet API creds should already be set up | |
library(stringi) | |
library(dplyr) | |
friends = get_friends(user="stephlocke") | |
followers = get_followers("stephlocke") | |
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 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
{ | |
"name": "QnA Maker FAQ", | |
"qnaList": [ | |
{ | |
"id": 0, | |
"answer": "You can change the default message if you use QnAMakerDialog. See this for details https://docs.botframework.com/en-us/azure-bot-service/template", | |
"source": "Custom Editorial", | |
"questions": [ | |
"How can I change the default message from QnA Maker?" | |
], |
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(hexSticker) | |
library(datasauRus) | |
library(ggplot2) | |
library(dplyr) | |
library(svglite) | |
p <- ggplot(aes(x, y), data = datasaurus_dozen) + | |
geom_point(colour = "khaki", | |
alpha = .1, | |
size = 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(httr) | |
library(purrr) | |
library(dplyr) | |
library(tidyr) | |
apikey="demo" | |
get_deal_properties = function(apikey="demo"){ | |
base_url = "https://api.hubapi.com" | |
properties_url = modify_url(base_url, | |
path ="/properties/v1/deals/properties/") |
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 R packages for use | |
library("dplyr") | |
library("recipes") | |
library("rsample") | |
library("broom") | |
library("jsonlite") | |
library("sessioninfo") | |
# Sample data | |
sm_iris = initial_split(iris) |