Skip to content

Instantly share code, notes, and snippets.

View zzzev's full-sized avatar

Zev Youra zzzev

View GitHub Profile
We can't make this file beautiful and searchable because it's too large.
a,b,c,r,ndb,name,food_group,protein,fat,carbohydrates,calories
0.00463448877499557,0.9950383708408871,0.00032714038411733436,717,01001,"Butter, salted",Dairy and Egg Products,0.85,81.11,0.06,717
0.0027736110718025644,0.9972263889281974,0,731,01002,"Butter, whipped, with salt",Dairy and Egg Products,0.49,78.3,0,731
0.0012493864620052653,0.9987506135379948,0,876,01003,"Butter oil, anhydrous",Dairy and Egg Products,0.28,99.48,0,876
0.2420677563486228,0.7314631525366211,0.02646909111475595,353,01004,"Cheese, blue",Dairy and Egg Products,21.4,28.74,2.34,353
0.25040405128757676,0.7195345329167115,0.030061415795711668,371,01005,"Cheese, brick",Dairy and Egg Products,23.24,29.68,2.79,371
0.24856252994729275,0.7460469573550551,0.005390512697652132,334,01006,"Cheese, brie",Dairy and Egg Products,20.75,27.68,0.45,334
0.26454672990847755,0.7293072349522346,0.006146035139287862,300,01007,"Cheese, camembert",Dairy and Egg Products,19.8,24.26,0.46,300
0.26804343197785824,0.6993825846284863,0.032573983393655526,376,01008,"Ch
@zzzev
zzzev / oscar_noms_with_metadata.csv
Created February 24, 2019 20:06
Oscar nominated films since 2000
We can make this file beautiful and searchable if this error is corrected: It looks like row 8 should actually have 13 columns, instead of 9. in line 7.
category,isWinner,id,year,name,adult,original_language,original_title,release_date,title,vote_average,vote_count,popularity
Best Actor in a Leading Role,TRUE,tt0169547,2000,American Beauty,FALSE,en,American Beauty,1999-09-15,American Beauty,8,6043,20.938
Best Actor in a Leading Role,FALSE,tt0174856,2000,The Hurricane,FALSE,en,The Hurricane,1999-09-17,The Hurricane,7.4,625,8.984
Best Actor in a Leading Role,FALSE,tt0166896,2000,The Straight Story,FALSE,en,The Straight Story,1999-10-15,The Straight Story,7.7,586,8.262
Best Actor in a Leading Role,FALSE,tt0140352,2000,The Insider,FALSE,en,The Insider,1999-10-28,The Insider,7.5,772,11.387
Best Actor in a Leading Role,FALSE,tt0158371,2000,Sweet and Lowdown,FALSE,en,Sweet and Lowdown,1999-12-03,Sweet and Lowdown,6.9,186,6.48
Best Actor in a Supporting Role,TRUE,tt0124315,2000,The Cider House Rules,FALSE,en,The Cider House Rules,1999-12-17,The Cider House Rules,7,496,8.625
Best Actor in a Supporting Role,FALSE,tt0167404,2000,The Sixth Sense,FALSE,en,The Sixth Sense,
@zzzev
zzzev / elders.csv
Created January 26, 2019 16:40
Worlds oldest person over time. Parsed and cleaned version of this data table: http://www.grg.org/Adams/C.HTM
birthplace name born died race sex deathplace
England (UK) Betsy Baker 1842-08-20 1955-10-24 White F U.S. (NE)
England (UK) Jennie Howell 1845-02-11 1956-12-16 White F U.S. (CA)
Denmark Anne Marie Carstenson 1849-01-24 1958-03-30 White F U.S. (NE)
U.S. (IN) Nancy Ryan 1849-09-05 1958-10-17 White F U.S. (IN)
Netherlands Christina Karnebeek-Backs 1849-10-02 1959-10-07 White F Netherlands
Norway Marie Olsen 1850-05-01 1959-11-24 White F Norway
U.S. (MI) Mary Kelly 1851-06-07 1964-12-30 White F U.S. (CA)
England (UK) Elizabeth Kensley 1855-05-12 1965-03-06 White F England (UK)
U.S. (TX) William Fullingim 1855-07-07 1965-08-06 White M U.S. (OK)
@zzzev
zzzev / mpaa-scrape.R
Created January 25, 2019 23:59
scrape mpaa ratings
library(httr)
library(xml2)
library(stringr)
library(tidyverse)
url <- "https://filmratings.com/Filmratings_CARA/WebCaraSearch/Service.asmx?op=GetTitleListByYearRatingFullWithPagination"
get_payload <- function(year, rating) str_glue(
'<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"',
' xmlns:xsd="http://www.w3.org/2001/XMLSchema" ',
@zzzev
zzzev / intersection_observer_bug.html
Created January 19, 2019 19:25
Bug repro demo for IntersectionObserver's bad handling of devicePixelRatio in Chrome 71. Both sides work properly on a device with devicePixelRatio == 1, left side works properly on FF mobile, but breaks on Chrome. Chrome requires compensation as shown on right side, but that doesn't work on FF mobile, and probably shouldn't be necessary.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>IntersectionObserver Bug Report Repro Demo</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
#step {
margin: 100vh auto;
THE DAILY CALLER: Let’s get the news of the day out at the top. There’s all of these things that are being discussed about the chief of staff [John Kelly], about Kirstjen Nielsen. Why are you disappointed in the DHS secretary and is John Kelly going to be staying in his job right now?
POTUS: So, you know, always in an administration after the midterms you make changes, so, I’m looking at things and I’ve got a lot of options. A lot of people want to come in. A lot of politicians that have had very successful careers that are very good want to come in. So I’m looking at things — haven’t made a decision yet. I will be making a decision on Homeland shortly.
But I have not made decisions yet. But I will be making changes on various things. Overall, I have a very good cabinet. I think our cabinet’s great.
You know, you’re talking about a few names, you’re not talking about many.
Uh, we’ve been doing incredibly on trade deals and trade with my whole staff of traders, because that’s what they are. What we’ve done on
Network Owner Owner after Disney/Fox Merger (if different)
A&E NETWORK Hearst Communications (50%),Disney (50%)
ADULT SWIM AT&T
AMC AMC Networks
AMERICAN HEROES CHANNEL Discovery Inc.
ANIMAL PLANET Discovery Inc.
BABY FIRST TV First Media
BBC-AMERICA BBC Studios,AMC Networks
BEIN SPORT beIN Media Group
BEIN SPORT ESPANOL beIN Media Group
@zzzev
zzzev / nielsen-basic-cable-q2-2018.csv
Last active November 15, 2018 00:04
Nielsen Basic Cable 2Q'18 Time Period Averages by network, Live+SD, ranked on P2+ (total viewers)
M-Su8p-11p Rank M-Su8p-11p Network M-Su8p-11p Dur M-Su8p-11p HHLD CVG AA% M-Su8p-11p HHLD AA (000) M-Su8p-11p P2+ AA (000) M-Su6a-6a Rank M-Su6a-6a Network M-Su6a-6a Dur M-Su6a-6a HHLD CVG AA% M-Su6a-6a HHLD AA (000) M-Su6a-6a P2+ AA (000)
1 FOX NEWS CHANNEL 16380 2.22 1948 2447 1 FOX NEWS CHANNEL 130860 1.36 1189 1409
2 TURNER NETWORK TELEVISION 16380 1.57 1418 1904 2 MSNBC 130860 0.94 822 930
3 MSNBC 16380 1.64 1440 1736 3 NICKELODEON 71580 0.71 620 865
4 ESPN 16380 1.32 1139 1522 4 TURNER NETWORK TELEVISION 130860 0.70 628 781
5 HOME AND GARDEN TV 16380 1.21 1089 1371 5 HOME AND GARDEN TV 116430 0.70 631 756
6 USA NETWORK 16380 1.08 985 1300 6 INVESTIGATION DISCOVERY 130860 0.74 614 701
7 TBS NETWORK 16380 1.00 908 1218 7 CNN 130860 0.64 581 658
8 INVESTIGATION DISCOVERY 16380 0.98 817 975 8 USA NETWORK 130860 0.56 507 610
9 HISTORY 16380 0.81 723 969 9 ESPN 130860 0.57 494 600
Party Code Party Name
100 Democratic Party
200 Republican Party
1 Federalist Party
13 Democratic-Republican Party
22 Adams Party
26 Anti Masonic Party
29 Whig Party
37 Constitutional Unionist Party
44 Nullifier Party
We can make this file beautiful and searchable if this error is corrected: It looks like row 8 should actually have 3 columns, instead of 2. in line 7.
name,owner(s),iconUrl
ABC,Disney,https://lh3.googleusercontent.com/R9A67CkW9Y_jh65DVg8lv55bl1qG3WQAibelXTfoLD9JCBf8qGD4ZeGt0fiktLSDAixopaqs8eLueKHxliS41Opv9hiyTDPNR6CWMQ=v2-s200
CBS,CBS,https://lh3.googleusercontent.com/dlhyqMk4C992krjBzStDgoT_m5UZZBQeo86ASQBLxut5vtjeACW4FrJ1Lfizcp_r6L_eaYdVNOaWcTDqcyMhcStKzascFNx1X7huaN4=v2-s150
FOX,21st Century Fox,https://lh3.googleusercontent.com/yG3z1gHuSCw3B1-MaBFYWiajPqn2i2d2axI_AjCdghAnt_c1RrlVgtAe3LPZMNDTFpg33Uvwc-QyxCxx2QoRL9lyrTwS8iqFSdC8VQ=v2-s200
NBC,Comcast,https://lh3.googleusercontent.com/szAvIGVVEW91NxfISbD6mXSph1TA-AYh1JOgbxz6OvRmrTihwnBdm4e5HWmTfjwsNGhu5IBNAjX9rpJdauuW26_NzHDSTUefNRxFJg=v2-s200
AMC,AMC Networks,https://lh3.googleusercontent.com/p1g3ya5yHHp8SrXI67hR9O_EiPJG69qNBU6u0GNqdTVuw9ZqwA7ESwshYNPxes9qv2fgNu4iJip1HNSpIiqOS1eS_-eGlatVM__E=v2-s720
BBC America,"BBC Studios,AMC Networks",https://lh3.googleusercontent.com/jAUUVEsOj3HYK8bJvmpaYa3tiu8iNHYEteBZQIpk14AvYFvLOIdEWiV-Ju-FzexvAsenQtKmknBr_tR3VFN5Ngmsf6m0t-l9xr_E1g=v2-s720
BBC World News,BBC Global