title: "SGAA_THANGZ" author: "Carl Boneri" date: "March 20, 2018" output: html_document: highlight: espresso keep_md: yes number_sections: yes theme: spacelab
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
#' Convert degrees to radians | |
deg2rad <- function(deg){ | |
rads <- deg*pi/180 | |
return(rads) | |
} | |
#' Calculates the geodesic distance between two points specified by | |
#' radian latitude/longitude using the | |
#' Spherical Law of Cosines (slc) | |
#' |
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 script uploads all the FAST files to the taxonomer server (only one file can be uploaded at a time) | |
# Assumes that you have RSelenium package installed and that you've got a simple selenium example to work | |
if (FALSE) { | |
fastq_files <- c( | |
list.files(# WHERE ARE THE FILES?, pattern = "fastq.gz$", full.names = TRUE) | |
) | |
login_password <- "" # what is my password??? | |
library(RSelenium) |
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
# sandbox.R is used to capture intermediate results of potential upcoming | |
# features which might make it into production. | |
# Check out the RSelenium package | |
# | |
# Load libraries and config file ----------------------------------------------- | |
library(RSelenium) | |
library(yaml) |
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
<html> | |
<head> | |
<!--Import Google Icon Font--> | |
<!--Let browser know website is optimized for mobile--> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<!-- Icon and Roboto Fonts --> | |
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> | |
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet"> | |
<!--Import materialize.css--> |
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
/** | |
* @author ebidel@ (Eric Bidelman) | |
* License Apache-2.0 | |
*/ | |
// Uses puppeteer and the browser's online/offline events to monitor connection status. | |
const util = require('util'); | |
const dns = require('dns'); | |
const puppeteer = require('puppeteer'); |
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
# create an account, create an app | |
# @see https://apps.twitter.com/ | |
# retrieve the access tokens | |
# @see https://dev.twitter.com/oauth/reference/post/oauth2/token | |
# create the file ~/twitter_api | |
nano ~/twitter_api | |
Authorization: OAuth oauth_consumer_key="XXXXXX", oauth_nonce="11111111", oauth_signature="XXXXXX", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1450728725", oauth_token="99999-XXXXXX", oauth_version="1.0" |
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 9.
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","rendered_character","icu_category_rgx","icu_block","icu_set","html_char_named","hex_cp","decimal_cp","unicode_cp" | |
"character tabulation","","Cc","C0 Controls and Basic Latin","mmlextra","	","	","	","" | |
"line feed (lf)","","Cc","C0 Controls and Basic Latin","mmlextra","
","
"," ","" | |
"exclamation mark","!","Po","C0 Controls and Basic Latin","9573-2003-isonum","!","!","!","!" | |
"quotation mark","""","Po","C0 Controls and Basic Latin","predefined xhtml1-special 9573-2003-isonum html5-uppercase","" "",""",""","\""" | |
"number sign","#","Po","C0 Controls and Basic Latin","9573-2003-isonum","#","#","#","#" | |
"dollar sign","$","Sc","C0 Controls and Basic Latin","9573-2003-isonum","$","$","$","$" | |
"percent sign","%","Po","C0 Controls and Basic Latin","9573-2003-isonum","%","%","%","%" | |
"ampersand","&","Po","C0 Controls and Basic Latin","predefined html5-uppercase 9573-2003-isonum","& & |
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
# Environment Utilities ---------------------------------------------- | |
#' Clean all lines out of the console. | |
#' | |
#' \code{env.clear_console} | |
#' | |
#' | |
#' Rstudio Server can get really slow if a lot of text, especially unicode | |
#' or foreign data types are sitting in the GUI. This function is the equiv | |
#' of \code{Edit > Ctrl + L} | |
#' |