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(tidyverse) | |
library(kerasformula) | |
library(textfeatures) | |
tweets <- read_csv("https://raw.githubusercontent.com/fivethirtyeight/russian-troll-tweets/master/IRAhandle_tweets_1.csv", | |
n_max = 25000) %>% | |
mutate(text = content) | |
features <- textfeatures(tweets, threads = 2) |
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(tidyverse) | |
library(igraph) | |
library(ggraph) | |
library(gganimate) | |
library(ggforce) | |
#File at https://dl.dropbox.com/s/hxmsut19lelgw33/epinetwork.rds | |
episim <- readRDS("epinetwork.rds") # Saved is the simulation data and an adjacency matrix for the network | |
# Create an undirected graph from this matrix | |
ign <- graph_from_adjacency_matrix(episim$network > 0, "undirected") |
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
print("UPDATE AUG 2023: this script is beyond old and broken") | |
print("You may find interesting and more up to date resources in the comments of the gist") | |
exit() | |
from slacker import Slacker | |
import json | |
import argparse | |
import os | |
# This script finds all channels, private channels and direct messages |
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
<? | |
///////////////////// | |
// slack2html | |
// by @levelsio | |
///////////////////// | |
// | |
///////////////////// | |
// WHAT DOES THIS DO? | |
///////////////////// | |
// |
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
# This docker-compose.yml will run the Hypothes.is annotation server. | |
# (adapted from instructions here https://h.readthedocs.org/en/latest/INSTALL.html) | |
# | |
# Place this file in the working directory (clone of https://github.com/hypothesis/h) | |
# run with docker-compose up -d | |
# | |
# Now browse to Hypothes.is at http://192.168.59.103:8000/ and create an account | |
# You'll see the invitation email in Mailcatcher at http://192.168.59.103:1080/ | |
# Click that invitation link and log in on your local Hypothes.is | |
# And you are ready to annotate! |
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
## GUIDE TO AUTH2 Authentication in R Shiny (or other online apps) | |
## | |
## Mark Edmondson 2015-02-16 - @HoloMarkeD | http://markedmondson.me | |
## | |
## v 0.1 | |
## | |
## | |
## Go to the Google API console and activate the APIs you need. https://code.google.com/apis/console/?pli=1 | |
## Get your client ID, and client secret for use below, and put in the URL of your app in the redirect URIs | |
## e.g. I put in https://mark.shinyapps.io/ga-effect/ for the GA Effect app, |
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(shiny) | |
library(datasets) | |
Logged = FALSE; | |
PASSWORD <- data.frame(Brukernavn = "withr", Passord = "25d55ad283aa400af464c76d713c07ad") | |
# Define server logic required to summarize and view the selected dataset | |
shinyServer(function(input, output) { | |
source("www/Login.R", local = TRUE) | |
observe({ | |
if (USER$Logged == TRUE) { |
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
// Browser fingerprinting is a technique to "mark" anonymous users using JS | |
// (or other things). To build an "identity" of sorts the browser is queried | |
// for a list of its plugins, the screen size and several other things, then | |
// hashes them. The idea is that these bits of information produce an unique | |
// "fingerprint" of sorts; the more elaborate the list of data points is, the | |
// more unique this fingerprint becomes. And you wouldn't even need to set a | |
// cookie to recognize this user when she visits again. | |
// | |
// For more information on this topic consult | |
// [Ars Technica](http://arstechnica.com/tech-policy/news/2010/05/how-your-web-browser-rats-you-out-online.ars) |
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(MASS) | |
## generate some random data | |
data <- data.frame(a=abs(rnorm(1000, mean=0.5)), b=abs(rnorm(1000, mean=0.5))) | |
data$a <- data$a / max(data$a) | |
data$b <- data$b / max(data$b) | |
## layout settings for ggplot |
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 requisite libraries | |
library(shiny) | |
library(googleVis) | |
# load raw data (NB not provided) | |
tableByGame <- read.csv("../tableByGame.csv",stringsAsFactors=FALSE) | |
# to create chart need to repeat one column and get negative of league position as hack | |
tableByGame$game <- tableByGame$seasonGame | |
tableByGame$lgPos <- -tableByGame$lgPos |
NewerOlder