Skip to content

Instantly share code, notes, and snippets.

View aegorenkov's full-sized avatar

Alexander Egorenkov aegorenkov

View GitHub Profile
@aegorenkov
aegorenkov / iterators.js
Created July 26, 2018 22:23
HardParts Promises and Iterators
// Type JavaScript here and click "Run Code" or press Ctrl + s
console.log('Hello, world!');
// CHALLENGE 1
function sumFunc(arr) {
// YOUR CODE HERE
let accumulator = 0;
for (let i = 0; i < arr.length; i++) {
accumulator += arr[i];
We can't make this file beautiful and searchable because it's too large.
City,Colors Reported,Shape Reported,State,Time
Ithaca,,TRIANGLE,NY,6/1/1930 22:00
Willingboro,,OTHER,NJ,6/30/1930 20:00
Holyoke,,OVAL,CO,2/15/1931 14:00
Abilene,,DISK,KS,6/1/1931 13:00
New York Worlds Fair,,LIGHT,NY,4/18/1933 19:00
Valley City,,DISK,ND,9/15/1934 15:30
Crater Lake,,CIRCLE,CA,6/15/1935 0:00
Alma,,DISK,MI,7/15/1936 0:00
Eklutna,,CIGAR,AK,10/15/1936 17:00
country beer_servings spirit_servings wine_servings total_litres_of_pure_alcohol continent
Afghanistan 0 0 0 0.0 AS
Albania 89 132 54 4.9 EU
Algeria 25 0 14 0.7 AF
Andorra 245 138 312 12.4 EU
Angola 217 57 45 5.9 AF
Antigua & Barbuda 102 128 45 4.9 NA
Argentina 193 25 221 8.3 SA
Armenia 21 179 11 3.8 EU
Australia 261 72 212 10.4 OC
user_id|age|gender|occupation|zip_code
1|24|M|technician|85711
2|53|F|other|94043
3|23|M|writer|32067
4|24|M|technician|43537
5|33|F|other|15213
6|42|M|executive|98101
7|57|M|administrator|91344
8|36|M|administrator|05201
9|29|M|student|01002
star_rating title content_rating genre duration actors_list
9.3 The Shawshank Redemption R Crime 142 [u'Tim Robbins', u'Morgan Freeman', u'Bob Gunton']
9.2 The Godfather R Crime 175 [u'Marlon Brando', u'Al Pacino', u'James Caan']
9.1 The Godfather: Part II R Crime 200 [u'Al Pacino', u'Robert De Niro', u'Robert Duvall']
9 The Dark Knight PG-13 Action 152 [u'Christian Bale', u'Heath Ledger', u'Aaron Eckhart']
8.9 Pulp Fiction R Crime 154 [u'John Travolta', u'Uma Thurman', u'Samuel L. Jackson']
8.9 12 Angry Men NOT RATED Drama 96 [u'Henry Fonda', u'Lee J. Cobb', u'Martin Balsam']
8.9 The Good, the Bad and the Ugly NOT RATED Western 161 [u'Clint Eastwood', u'Eli Wallach', u'Lee Van Cleef']
8.9 The Lord of the Rings: The Return of the King PG-13 Adventure 201 [u'Elijah Wood', u'Viggo Mortensen', u'Ian McKellen']
8.9 Schindler's List R Biography 195 [u'Liam Neeson', u'Ralph Fiennes', u'Ben Kingsley']
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
. psmatch2 Treated Age Education Black Hispanic Married Nodegree, outcome(RE78) logit
note: Black != 1 predicts failure perfectly
Black dropped and 1 obs not used
note: Hispanic omitted because of collinearity
note: Married omitted because of collinearity
Logistic regression Number of obs = 9
LR chi2(3) = 4.22
Prob > chi2 = 0.2382