A list of useful commands for the FFmpeg command line tool.
Download FFmpeg: https://www.ffmpeg.org/download.html
Full documentation: https://www.ffmpeg.org/ffmpeg.html
A list of useful commands for the FFmpeg command line tool.
Download FFmpeg: https://www.ffmpeg.org/download.html
Full documentation: https://www.ffmpeg.org/ffmpeg.html
The dplyr package in R makes data wrangling significantly easier.
The beauty of dplyr is that, by design, the options available are limited.
Specifically, a set of key verbs form the core of the package.
Using these verbs you can solve a wide range of data problems effectively in a shorter timeframe.
Whilse transitioning to Python I have greatly missed the ease with which I can think through and solve problems using dplyr in R.
The purpose of this document is to demonstrate how to execute the key dplyr verbs when manipulating data using Python (with the pandas package).
dplyr is organised around six key verbs:
| #' Description | |
| #' This file runs a live election-night forecast based on The Economist's pre-election forecasting model | |
| #' available at projects.economist.com/us-2020-forecast/president. | |
| #' It is resampling model based on https://pkremp.github.io/update_prob.html. | |
| #' This script does not input any real election results! You will have to enter your picks/constraints manually (scroll to the bottom of the script). | |
| #' | |
| #' Licence | |
| #' This software is published by *[The Economist](https://www.economist.com)* under the [MIT licence](https://opensource.org/licenses/MIT). The data generated by *The Economist* are available under the [Creative Commons Attribution 4.0 International License](https://creativecommons.org/licenses/by/4.0/). | |
| #' The licences include only the data and the software authored by *The Economist*, and do not cover any *Economist* content or third-party data or content made available using the software. More information about licensing, syndication and the copyright of *Economist* content can be fou |
| # Usage: | |
| # source iterm2.zsh | |
| # iTerm2 tab color commands | |
| # https://iterm2.com/documentation-escape-codes.html | |
| if [[ -n "$ITERM_SESSION_ID" ]]; then | |
| tab-color() { | |
| echo -ne "\033]6;1;bg;red;brightness;$1\a" | |
| echo -ne "\033]6;1;bg;green;brightness;$2\a" |
| SmoothCoefficientPlot <- function(models, modelnames = "", removeintercept = FALSE){ | |
| # models must be a list() | |
| Alphas <- seq(1, 99, 2) / 100 | |
| Multiplier <- qnorm(1 - Alphas / 2) | |
| zzTransparency <<- 1/(length(Multiplier)/4) | |
| CoefficientTables <- lapply(models, function(x){summary(x)$coef}) | |
| TableRows <- unlist(lapply(CoefficientTables, nrow)) |
| body { | |
| font-family: Helvetica, arial, sans-serif; | |
| font-size: 14px; | |
| line-height: 1.6; | |
| padding-top: 10px; | |
| padding-bottom: 10px; | |
| background-color: white; | |
| padding: 30px; } | |
| body > *:first-child { |
| /** | |
| * Linkurious 2012, all rights reserved. | |
| * Sébastien Heymann <seb@linkurio.us>, | |
| * Romain Yon <romain@linkurio.us> | |
| * | |
| * Please use http://jsbeautifier.org/ and indent with 2 spaces. | |
| * | |
| * Lib docs: | |
| * http://twitter.github.com/bootstrap/ | |
| * http://docs.jquery.com/ |
| license: gpl-3.0 | |
| height: 600 | |
| border: no | |
| redirect: https://beta.observablehq.com/@mbostock/d3-choropleth |
| #=============================================================================== | |
| # 2019-07-19-- ikashnitsky.github.io | |
| # Reproduce Figure 2 from http://doi.org/10.1007/s10708-018-9953-5 | |
| # Ilya Kashnitsky, ilya.kashnitsky@gmail.com | |
| #=============================================================================== | |
| library(tidyverse) | |
| library(hrbrthemes); import_roboto_condensed() | |
| # the data as tribble |
| --- | |
| title: "World maps" | |
| output: | |
| html_document: | |
| df_print: paged | |
| --- | |
| ```{r echo = FALSE, message = FALSE} | |
| library(tidyverse) | |
| library(sf) |