Some of the techniques I've used to learn languages quickly and thoroughly:
-
Shadowing
-
Scriptorium
-
Side-by-Side Reading
| import time | |
| from flask import Flask, request, g, render_template | |
| app = Flask(__name__) | |
| app.config['DEBUG'] = True | |
| @app.before_request | |
| def before_request(): | |
| g.request_start_time = time.time() |
| library(dplyr) | |
| library(tidyr) | |
| library(ggplot2) | |
| library(animation) | |
| #Data from https://crudata.uea.ac.uk/cru/data/temperature/ | |
| #As well as data read in script | |
| source("read_cru_hemi.R") | |
| temp_dat <- read_cru_hemi("./HadCRUT4-gl.dat") | |
| #remove cover |
| library(tidyverse) | |
| library(stringr) | |
| # read in the transcript | |
| # I simply copied the text from the page at | |
| # https://www.washingtonpost.com/news/the-fix/wp/2016/09/26/the-first-trump-clinton-presidential-debate-transcript-annotated/ | |
| # and popped it into a txt file | |
| xx <- scan("first_debate_2016.txt", "character") |
| code;name | |
| 01;Personal Care Activities | |
| 0101;Sleeping | |
| 0102;Grooming | |
| 0103;Health-related self care | |
| 0104;Personal Activities | |
| 0105;Personal Care Emergencies | |
| 0199;Personal care, n.e.c.* | |
| 02;Household Activities | |
| 0201;Housework |
| ################################################################################ | |
| # | |
| # ikashnitsky.github.io 2017-07-18 | |
| # Accessing Eurostat data using the `eurostat` R package | |
| # Young people neither in employment nor in education and training in Europe | |
| # Ilya Kashnitsky, [email protected] | |
| # | |
| ################################################################################ | |
| library(tidyverse) |
| ################################################################################ | |
| # replication of https://i.redd.it/q0udc4wfhvjz.gif | |
| # originally posted to r/dataisbeautiful by u/Tjukanov | |
| ################################################################################ | |
| library(tidyverse) | |
| library(gganimate) | |
| library(lubridate) | |
| #data from: https://www.ncdc.noaa.gov/ibtracs/index.php?name=wmo-data | |
| df <- read_csv("Allstorms.ibtracs_wmo.v03r09.csv") |
| import smbus | |
| import time | |
| DEV_ADDRESS = 0x15 | |
| class Bearable(): | |
| def __init__(self): | |
| self.bus=smbus.SMBus(1) | |
| self.leds = [0]*12 |
| # this script automates the collection, processing, and plotting of gridwatch energy data | |
| # 2019-05-27 | |
| # @kiernann | |
| # u/WannabeWonk | |
| # install.packages("pacman") | |
| pacman::p_load( | |
| RSelenium, | |
| readr, | |
| dplyr, |
| library(eurostat) # eurostat data | |
| library(rnaturalearth) # worldwide map data | |
| library(tidyverse) # tidy data transformation | |
| library(lubridate) # date and time support | |
| library(sf) # simple features GIS | |
| euro_pop <- | |
| get_eurostat('demo_r_pjanaggr3', stringsAsFactors = FALSE) %>% | |
| filter( | |
| str_length(geo) == 5, # NUTS-3 |