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
set number " show line numbers in vim | |
set relativenumber " show relative line numbers |
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
# contents of app.R | |
library(shiny) | |
ui <- fluidPage( | |
titlePanel('Hello World') | |
) |
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
# contents of app.R | |
library(shiny) | |
ui <- fluidPage( | |
# our title | |
titlePanel('Wordcloud Web App'), | |
# defining the sidebar |
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
server <- function(input, output) { | |
# defining a reactive function | |
# reacts to changes in the ngram slider | |
# by taking it out of the output$wordcloud function | |
# we have more control over when our dplyr statement | |
# will get updated | |
ngrams <- reactive({ | |
# the $<name> is used to reference the name |
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
call pathogen#infect() | |
filetype plugin indent on | |
syntax on | |
runtime macros/matchit.vim | |
""""""""""""""""""" | |
" USEFUL DEFAULTS " | |
""""""""""""""""""" |
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
extern crate reqwest; | |
extern crate select; | |
use select::document::Document; | |
use select::predicate::Name; | |
fn main() { | |
hacker_news("https://news.ycombinator.com"); | |
} |
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
extern crate reqwest; | |
extern crate scraper; | |
// importation syntax | |
use scraper::{Html, Selector}; | |
fn main() { | |
hn_headlines("https://news.ycombinator.com"); | |
} |
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
extern crate reqwest; | |
extern crate select; | |
use select::document::Document; | |
use select::predicate::{Class, Name, Predicate}; | |
fn main() { | |
hacker_news("https://news.ycombinator.com"); | |
} |
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
// specifying we'll be using a macro from | |
// the prettytable crate (ex: row!()) | |
#[macro_use] | |
extern crate prettytable; | |
extern crate reqwest; | |
extern crate select; | |
use select::document::Document; | |
use select::predicate::{Class, Name, Predicate}; | |
use prettytable::Table; |
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
" Function: display errors from Ale in statusline | |
function! LinterStatus() abort | |
let l:counts = ale#statusline#Count(bufnr('')) | |
let l:all_errors = l:counts.error + l:counts.style_error | |
let l:all_non_errors = l:counts.total - l:all_errors | |
return l:counts.total == 0 ? '' : printf( | |
\ 'W:%d E:%d', | |
\ l:all_non_errors, | |
\ l:all_errors | |
\) |
OlderNewer