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
require(igraph) | |
require(RCurl) | |
require(rjson) | |
# Insert your own token | |
access_token <- '****' | |
# Romain François's function to connect to Facebook Graph API | |
facebook <- function( path = "me", access_token = token, options) { | |
if( !missing(options) ){ |
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) | |
shinyServer(function(input, output) { | |
output$distPlot <- renderPlot({ | |
dist <- rnorm(input$obs) | |
hist(dist) | |
}) | |
output$distPlot2 <- renderPlot({ |
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(gmp) | |
drawStar <- function(center, length, pts, direction=0, segments=F, colour=F) { | |
if(length(pts)==0) return() | |
if(segments & (pts[1]==2)) direction <- direction + pi/2 | |
for(i in 1:pts[1]) { | |
point <- center + | |
length*c(cos(direction+pi/2+i*2*pi/pts[1]), | |
sin(direction+pi/2+i*2*pi/pts[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
/* Original code from the Arduino Experimentation Kit Example Code | | |
* CIRC-10 .: Temperature :. (TMP36 Temperature Sensor) | | |
* Amended to be used in Java/R | |
*/ | |
//TMP36 Pin Variables | |
int temperaturePin = 0; | |
void setup() | |
{ |
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
Verifying that +jean_robert is my openname (Bitcoin username). https://onename.io/jean_robert |
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
import random | |
import copy | |
class TTTGame: | |
board = [' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '] | |
playerX = None | |
playerO = None | |
def showBoard(self): |