Some of the techniques I've used to learn languages quickly and thoroughly:
-
Shadowing
-
Scriptorium
-
Side-by-Side Reading
import os | |
os.environ["OPENAI_API_KEY"] = "" | |
from flask import Flask, Response, request | |
import threading | |
import queue | |
from langchain.chat_models import ChatOpenAI | |
from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler | |
from langchain.schema import AIMessage, HumanMessage, SystemMessage |
# Geographical Data ------------------------------------------------------- | |
library(dplyr) | |
# download geospatial data for NUTS-3 regions | |
euro_nuts3_sf <- | |
eurostat::get_eurostat_geospatial(output_class = 'sf', resolution = '60', nuts_level = 3) %>% | |
sf::st_transform(crs = 3035) |
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 |
# 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, |
import smbus | |
import time | |
DEV_ADDRESS = 0x15 | |
class Bearable(): | |
def __init__(self): | |
self.bus=smbus.SMBus(1) | |
self.leds = [0]*12 |
################################################################################ | |
# 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") |
################################################################################ | |
# | |
# 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) |
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 |
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") |