This works only on Unix.
- Get youtube-dl
- List the formats for the video with
youtube-dl --list-formats <url>You'll get an output like
[youtube] h3--ed9sOQo: Downloading webpage
[youtube] h3--ed9sOQo: Downloading m3u8 information
| year | cpi_percent | |
|---|---|---|
| 2020 | 3.32 | |
| 2019 | 2.56 | |
| 2018 | 2.43 | |
| 2017 | 2.19 | |
| 2016 | 3.8 | |
| 2015 | 4.35 | |
| 2014 | 4.39 | |
| 2013 | 1.93 | |
| 2012 | 3.02 |
This works only on Unix.
youtube-dl --list-formats <url>You'll get an output like
[youtube] h3--ed9sOQo: Downloading webpage
[youtube] h3--ed9sOQo: Downloading m3u8 information
| # Compute transition matrix based on a distribution | |
| using LinearAlgebra, Distributions | |
| function fTransitionMatrix(grid; dist = LogNormal()) | |
| N = size(grid)[1] | |
| Mat = UpperTriangular(transpose(repeat(grid, outer=[1, N])) .- grid) | |
| prMat = cdf.(dist, Mat) | |
| trMat = hcat(prMat[:, 2:end], ones(N)) .- prMat | |
| end |
Stanford's new Interactive Online IO seminar, aka (IO)^2.
When: Tuesdays and Fridays, 12:00 - 13:00 ET
| year | tot_inc | dpad | tot_ded | tot_cred | tot_ded_no_dpad | |
|---|---|---|---|---|---|---|
| 2008 | 8775331143 | 18402344 | 8326939127 | 110593038 | 8308536783 | |
| 2009 | 7886561418 | 14208754 | 7499810538 | 103929098 | 7485601784 | |
| 2010 | 8144430285 | 24366835 | 7424856017 | 131342301 | 7400489182 | |
| 2011 | 8389697631 | 27353624 | 7691212916 | 125526604 | 7663859292 | |
| 2012 | 8661354506 | 31962519 | 7690545497 | 130747914 | 7658582978 | |
| 2013 | 8784239695 | 33873987 | 7722842521 | 143929211 | 7688968534 | |
| 2014 | 13729702329 | 36762355 | 11667987910 | 131633981 | 11631225555 | |
| 2015 | 13981086321 | 36543133 | 12027815329 | 124023841 | 11991272196 |
| // Working directory | |
| if "`c(username)'"=="alvaro" { | |
| cd "~/Dropbox/Princeton/2020-Spring/524-PF/PS3/" | |
| } | |
| else di as error "DUMMY U HAVE TO CHANGE THE PATH" | |
| // Color scheme (from SSC) | |
| set scheme plotplain | |
| // Political data |
| #%% Load libraries | |
| using CSV, DataFrames, DataFramesMeta | |
| using LinearAlgebra | |
| using Optim # GMM() optimization | |
| # using FixedEffectModels | |
| # using RegressionTables | |
| using StatsBase # sample() for bootstrap sample | |
| using ProgressMeter | |
| using Latexify |
| #%% Load libraries | |
| using DataFrames, CSV | |
| using Statistics | |
| using Plots, LaTeXStrings | |
| #%% Read and prepare data | |
| cd("/home/alvaro/Dropbox/Princeton/2020-Spring/542-IO/PS1") | |
| df = CSV.read("data/Pset1_2020Data.csv"); | |
| # Add dummy columns for number of active firms in each market |
| #!/bin/bash | |
| bold=$(tput bold) | |
| normal=$(tput sgr0) | |
| downloadsPath=$(xdg-user-dir DOWNLOAD) | |
| juliaVersion="julia-1.1.0" | |
| # echo "${bold}1/3 Downloading" |
| # Curl | |
| sudo apt -y install curl | |
| # Atom | |
| curl -L https://packagecloud.io/AtomEditor/atom/gpgkey | sudo apt-key add - | |
| sudo sh -c 'echo "deb [arch=amd64] https://packagecloud.io/AtomEditor/atom/any/ any main" > /etc/apt/sources.list.d/atom.list' | |
| sudo apt update | |
| sudo apt -y install atom |