Notes about online course "Lean How to Learn": https://www.coursera.org/learn/learning-how-to-learn.
Goal: learn easily and get less frustrated
Notes about online course "Lean How to Learn": https://www.coursera.org/learn/learning-how-to-learn.
Goal: learn easily and get less frustrated
| library(rjson) | |
| library(httr) | |
| library(ggplot2) | |
| library(scales) | |
| if (interactive()) { | |
| token <- readline(prompt="Enter Strava access token: ") | |
| activities <- GET("https://www.strava.com/", path = "api/v3/activities", | |
| query = list(access_token = token, per_page = 200)) | |
| activities <- content(activities, "text") |
| query { | |
| repository(owner: "softwarevidal", name: "arthur") { | |
| pullRequests(states: [OPEN]) { | |
| totalCount | |
| } | |
| } | |
| } |
| import java.util.ArrayList; | |
| import java.util.List; | |
| import static java.lang.System.out; | |
| import static java.util.stream.Collectors.toList; | |
| import static java.util.stream.Collectors.toSet; | |
| import static java.util.stream.IntStream.range; | |
| public class WonderlandNumbers { |
| import Data.List | |
| main = do | |
| putStrLn $ unwords $ map show $ filter isWonderNumber [100000..10000000] | |
| isWonderNumber :: Integer -> Bool | |
| isWonderNumber x = all (== digits x) (map digits (multiples x)) | |
| multiples :: Integer -> [Integer] | |
| multiples x = map (* x) [2..6] |
| import System.CPUTime | |
| fibo :: Int -> Int | |
| fibo n | |
| | n <= 1 = n | |
| | otherwise = fibo(n - 1) + fibo(n - 2) | |
| getCPUTimeDouble :: IO Double | |
| getCPUTimeDouble = do t <- System.CPUTime.getCPUTime; return ((fromInteger t) * 1e-12) |
| # CPU & mem usage per process (sampling) | |
| top # list processes | |
| top -h # list threads | |
| top -c # show full command line | |
| htop | |
| # CPU usage per CPU: | |
| mpstat -P ALL 1 | |
| # Processes (uptime, hierarchy, CPU usage, etc...): |