# C
CC=clang
CFLAGS=-g -O2 -Wall -pedantic -mtune=native
# C++
CXX=clang++
CXXFLAGS=-g -O2 -Wall -pedantic -mtune=native
# -Wno-unused-local-typedef
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
#!/bin/bash | |
# To rename files in bulk | |
# e.g., renaming `fasta` to `fa` | ABC.fasta XYZ.fasta to ABC.fa XYZ.fa | |
# ref: https://ryanstutorials.net/linuxtutorial/bonus.php#xargs | |
basename -s .fasta -a *.fasta | xargs -n1 -i mv {}.fasta {}.fa |
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
# If you want to use `tidyverse` to do this, you could use the `map` function to simplify! | |
my_path <- c("/path/to/files/") # set your path | |
source_files <- list.files(my_path, "*.R") # locate all .R files | |
map(paste0(my_path, source_files), source) # source all your R scripts! |
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
# To install homebrew on macOS: Mojave, (High)Sierra, El Capitan, Yosemite | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" |
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
# knitr::purl(input_file, output_file, documentation = 2) | |
infile <- "your_filename.Rmd" | |
inpath <- "docs/"; outpath <- "scripts/" | |
name <- strsplit(infile, split = "\\.")[[1]][1] | |
knitr::purl(paste0(inpath, infile), | |
paste0(outpath, name, | |
"_rmd2r_", format(Sys.time(), "%Y%m%d"), |
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
#' ## rmd2rscript: a function to convert R Markdown to an R script which can be sourced | |
#' ## script for converting .Rmd files to .R scripts. | |
#' ## Author: Kevin Keenan 2014 | |
#' ## http://rstudio-pubs-static.s3.amazonaws.com/12734_0a38887f19a34d92b7311a2c9cb15022.html | |
#' ## Slightly modified by: Janani Ravi 2019 | |
#' | |
#' This function will read a standard R markdown source file and convert it to | |
#' an R script to allow the code to be run using the "source" function. | |
#' | |
#' The function is quite simplisting in that it reads a .Rmd file and adds |
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
warning("You probably don't want to use this `backstitch()` function.", | |
"\n It's hacky and there's a much better option in knitr called `purl()`.", | |
"\n More info at: `?knitr::purl`") | |
#' Backstitch an Rmd file to an R script | |
#' | |
#' Takes an Rmd file -- that would be converted with knitr::knit() -- and | |
#' "backstitches" it into an R script suitable for knitr::purl(). The output | |
#' file is the just the backstitched R script when `output_type = 'script'`, or | |
#' just the code chunks when `output_type = 'code'` (note that all inline code |
> devtools::install_github('thomasp85/FindMyFriends')
Downloading GitHub repo thomasp85/FindMyFriends@master
Skipping 6 packages ahead of CRAN: BiocGenerics, Biostrings, IRanges, S4Vectors, XVector, zlibbioc
Installing 11 packages: apcluster, Biobase, BiocParallel, e1071, filehash, ggdendro, igraph, kebabs, kernlab, LiblineaR, snow
trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/apcluster_1.4.7.tgz'
Content type 'application/x-gzip' length 1949324 bytes (1.9 MB)
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
# Orig tweeps author: stephlocke | |
# Adapted to find data scientists in the Michigan, East Lansing area! | |
library(rtweet) #rtweet API creds should already be set up | |
library(stringi) | |
library(tidyverse) | |
friends = get_friends(user="gdequeiroz ") #stephlocke #JennyBryan #hadleywickham | |
followers = get_followers("gdequeiroz") #janani137 | |
tweeps_id = distinct(bind_rows(friends, followers)) |
NewerOlder