This file contains hidden or 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(httpuv) | |
| library(httr) | |
| library(stringr) | |
| app <- list( | |
| call = function(req) { | |
| paths <- str_split(req$PATH_INFO, "/")[[1]] | |
| owner <- paths[2] | |
| repo <- paths[3] | |
| path <- str_c(paths[4:length(paths)]) |
This file contains hidden or 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
| @@ -1,1 +1,1 @@ | |
| /* | |
| * launcher.cc | |
| * | |
| * Copyright (C) 2009-13 by RStudio, Inc. | |
| * | |
| * This program is licensed to you under the terms of version 3 of the | |
| * GNU Affero General Public License. This program is distributed WITHOUT | |
| * ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT, | |
| * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the |
This file contains hidden or 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(tidyverse) | |
| library(DBI) | |
| con <- dbConnect(RSQLite::SQLite(), dbname = "mtcars.sqlite") | |
| onStop(function() dbDisconnect(con)) | |
| # to create the .sqlite file | |
| # con %>% dbWriteTable("mtcars", mtcars) |
This file contains hidden or 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
| echo $UCDSECRET | openconnect -b --juniper -u $UCDUSER --passwd-on-stdin --script-tun --script "ocproxy -D 8080" vpn.library.ucdavis.edu |
This file contains hidden or 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
| Homebrew build logs for rstudio-server on Ubuntu 16.04.6 LTS | |
| Build date: 2019-04-22 01:41:36 |
This file contains hidden or 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/sh | |
| git diff --ignore-space-at-eol -U0 --cached > foo.patch | |
| git reset | |
| git apply --ignore-whitespace --unidiff-zero --cached foo.patch | |
| rm foo.patch |
This file contains hidden or 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
| from LSP.plugin.core.handlers import LanguageHandler | |
| from LSP.plugin.core.settings import ClientConfig | |
| class LspRLangPlugin(LanguageHandler): | |
| name = "rlang" | |
| def __init__(self): | |
| self._config = ClientConfig( | |
| name=self.name, | |
| binary_args=[ |
This file contains hidden or 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
| from LSP.plugin.core.handlers import LanguageHandler | |
| from LSP.plugin.core.settings import ClientConfig | |
| class LspRcppPlugin(LanguageHandler): | |
| name = "cquery-r" | |
| def __init__(self): | |
| self._config = ClientConfig( | |
| name=self.name, |
This file contains hidden or 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
| ## All functions from other packages will be called | |
| ## using the double colon (::) (i.e. the scope operator) | |
| # 1. | |
| library(RcppAlgos) | |
| library(arrangements) | |
| library(microbenchmark) | |
| options(digits = 4) |
This file contains hidden or 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 cProfile, pstats | |
| pr = cProfile.Profile() | |
| pr.enable() | |
| pr.disable() | |
| ps = pstats.Stats(pr).sort_stats('time') | |
| ps.print_stats(10) |