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
# run from the package top level | |
check_stale_imports_suggests <- function() { | |
# helper function: removes extra characters | |
# from strings read by read.dcf | |
clean_up <- function(string) { | |
string <- gsub("\n", "", string) | |
string <- gsub("\\(.+\\)", "", string) | |
string <- unlist(strsplit(string, ",")) |
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: "Explore Github Topics" | |
author: "Bryan Hanson" | |
date: 2020-01-24 | |
--- | |
<!-- Following code to keep printed version cleaner; see https://stackoverflow.com/a/24467913/633251 --> | |
<style type="text/css" media="print"> | |
a:link:after, a:visited:after { | |
content: normal !important; |
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
# R code | |
# Based on https://stackoverflow.com/a/23810363/633251 | |
# This is called "Web Application Flow" | |
# see https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow | |
# Follow the instructions there to set up a token. Never share your key or secret. | |
library("httr") | |
myapp <- oauth_app("FOSS", key = "pqr", secret = "xyz") | |
github_token <- oauth2.0_token(oauth_endpoints("github"), myapp) |
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
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<body> | |
<script src = "http://d3js.org/d3.v3.min.js"> </script> | |
</body> | |
<script> |
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
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<body> | |
<script src = "http://d3js.org/d3.v3.min.js"> </script> | |
<script> | |
// Draw a very simple line using d3 functions |
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
# R functions to determine if two line segments intersect | |
# Note: this is very different question from whether | |
# two lines intersect (terminology is important!) | |
# These functions are based upon the excellent discussion here, | |
# written by Martin Thoma: | |
# martin-thoma.com/how-to-check-if-two-line-segments-intersect/ | |
# The starting point was the code here: | |
# github.com/MartinThoma/algorithms/tree/master/crossingLineCheck/Geometry/src |