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(readr) | |
library(tidyr) | |
library(ggplot2) | |
CDC_YRBS_eversex <- read_delim("CDC_YRBS_eversex.tsv", | |
"\t", escape_double = FALSE, na = "N/A", | |
trim_ws = TRUE) | |
CDC_YRBS_eversex$Grade <- factor(CDC_YRBS_eversex$Grade, levels=c("9th","10th", "11th", "12th")) |
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
# Tax regression plot | |
# Linear Regression | |
tax_fit <- lm(percent_bad_roads ~ tax_burden, data = State_Infrastructure) | |
min_gap = 0.05 | |
lab_coord_xmin = min(State_Infrastructure$tax_burden) | |
lab_coord_xmax = max(State_Infrastructure$tax_burden) | |
lab_coord_ymin = min(State_Infrastructure$percent_bad_roads) - min_gap | |
lab_coord_height = 0.1 |
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
# Basic Name Plot | |
tax_plot <- ggplot(State_Infrastructure, aes(x=tax_burden, y=percent_bad_roads, label=State)) | |
tax_state_names_plot <- tax_plot + geom_text_repel() + geom_point(color = 'red') + theme_classic(base_size = 16) | |
# OUTPUT | |
tax_state_names_plot + ggtitle("Road Conditions vs Tax Burden") + | |
scale_x_continuous(name = "State and Local Tax Burden") + | |
scale_y_continuous(name = "Percent of roads not in good condition") |
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
# Get equation text from LM | |
# Format: y = a + b.x, R^2 = r^2 | |
equation_text = function(x, round_dig = 2) { | |
lm_coef <- list(a = as.character(round(coef(x)[1], digits = round_dig)), | |
b = as.character(round(coef(x)[2], digits = round_dig)), | |
r2 = round(summary(x)$r.squared, digits = round_dig)); | |
lm_eq <- substitute(italic(y) == a + b %.% italic(x)*","~~italic(R)^2~"="~r2,lm_coef) | |
as.character(as.expression(lm_eq)); | |
} |
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
How good is your GAN ? https://hal.inria.fr/hal-01850447/document | |
Low Shot visual recognition by hallucinating features https://arxiv.org/pdf/1606.02819.pdf | |
Google JFT-300M https://arxiv.org/pdf/1707.02968.pdf | |
Instagram Imagenet https://research.fb.com/wp-content/uploads/2018/05/exploring_the_limits_of_weakly_supervised_pretraining.pdf | |
Deep Layer Aggregation https://arxiv.org/pdf/1707.06484.pdf | |
CNNs fit random data https://arxiv.org/pdf/1611.03530.pdf | |
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
ActivityNet 2018 Results: http://activity-net.org/challenges/2018/uploads/ActivityNet_Challenge_2018_Summary_and_Workshop_Papers.pdf | |
I3D: https://www.arxiv-vanity.com/papers/1705.07750/ | |
3D CNNs: http://openaccess.thecvf.com/content_cvpr_2018/papers/Hara_Can_Spatiotemporal_3D_CVPR_2018_paper.pdf | |
AVA: http://openaccess.thecvf.com/content_cvpr_2018/papers/Gu_AVA_A_Video_CVPR_2018_paper.pdf | |
Kinetics: https://arxiv.org/pdf/1705.06950.pdf |
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
def beam_search(captioning_model, prev_words_input, other_inputs, k): | |
top_k_predictions = [copy.deepcopy(prev_words_input) for _ in range(k)] | |
top_k_score = np.array([[0.0]*top_k_predictions[0].shape[0]]*k) | |
# First Iteration | |
predictions = captioning_model.predict(other_inputs + [prev_words_input]) | |
for idx in range(prev_words_input.shape[0]): | |
for version in range(k): | |
top_k_predictions[version][idx][1] = np.argsort(predictions[idx])[-(version+1)] | |
top_k_score[version][idx] = np.sort(predictions[idx])[-(version+1)] |
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
\usepackage{pgfplots} | |
\pgfplotsset{compat=1.8} | |
\begin{figure} | |
\centering | |
\begin{tikzpicture} | |
\begin{axis} | |
[ title = Number of videos in each category in MSR-VTT, | |
xbar, |
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 stopwords import remove_stopwords | |
dummy_string = ("""Mr. and Mrs. Dursley, of number four, Privet Drive, were """ | |
"""proud to say that they were perfectly normal, thank you """ | |
"""very much. They were the last people you'd expect to be """ | |
"""involved in anything strange or mysterious, because they """ | |
"""just didn't hold with such nonsense.""") | |
# Simple Word tokenizer | |
dummy_list = dummy_string.replace(",", " ").replace(".", " ").split(" ") |
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
wget download-installer.cdn.mozilla.net/pub/firefox/releases/57.0b4/linux-x86_64/en-US/firefox-57.0b4.tar.bz2 | |
wget http://download-installer.cdn.mozilla.net/pub/firefox/releases/57.0b4/SHA256SUMS | |
diff <(sha256sum firefox-57.0b4.tar.bz2 | awk 'BEGIN{FS=" "} {print $1}') <(grep "linux-x86_64/en-US/firefox-57.0b4.tar.bz2" SHA256SUMS | awk 'BEGIN{FS=" "} {print $1}') | |
tar xjf firefox-57.0b4.tar.bz2 | |
sudo rm -r /opt/firefox | |
sudo mv firefox /opt/quantum | |
sudo mv /usr/bin/firefox /usr/bin/firefox-old | |
sudo ln -s /opt/quantum/firefox /usr/bin/firefox |