Skip to content

Instantly share code, notes, and snippets.

David Yanofsky yanofsky

Block or report user

Report or block yanofsky

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@yanofsky
yanofsky / tweet_dumper.py
Last active Dec 7, 2019
A script to download all of a user's tweets into a csv
View tweet_dumper.py
#!/usr/bin/env python
# encoding: utf-8
import tweepy #https://github.com/tweepy/tweepy
import csv
#Twitter API credentials
consumer_key = ""
consumer_secret = ""
access_key = ""
@yanofsky
yanofsky / gif_maker.sh
Created Mar 7, 2015
How to Make a gif from a folder of images
View gif_maker.sh
# requirement! install imagemagick
# brew install imagemagick
# or build from source here http://www.imagemagick.org/script/binary-releases.php
#navigate to folder of the images
cd folderofmyimages/
# take every jpg in the folder and smash into a gif with a frame rate of 0.5 sec
convert -delay 50 *.jpg gif_of_my_images.gif
@yanofsky
yanofsky / Makefile
Last active May 4, 2019
This is workflow for downloading, processing, and mosaicing Landsat scenes, as a Makefile
View Makefile
# lansatutil directory
LANDSAT = ~/landsat
# scenes to target
LANDSAT_IDS = \
LC81220442016038LGN00 \
LC81220452016038LGN00 \
LC81210442014281LGN00 \
LC81210452014281LGN00
@yanofsky
yanofsky / jobsday_static_charts.sh
Created Apr 4, 2014
QZ Two simple charts script
View jobsday_static_charts.sh
#download the data and save it as json for the overview via a python script
cd overview
python overview_scraper.py
cd ../sector
#download the data and save it as json for the sector info via python script
python sector_scraper.py
cd ..
@yanofsky
yanofsky / recent_realdonaldtrump_tweets.csv
Created Aug 4, 2016
Recent tweets and the source app from Donald Trump
View recent_realdonaldtrump_tweets.csv
We can't make this file beautiful and searchable because it's too large.
id,url,created_at,text,source
761219396635361280,http://twitter.com/realdonaldtrump/status/761219396635361280,2016-08-04 15:17:01,"Looking forward to IA & WI with Gov. Pence, tomorrow. Join us! #MAGA
https://t.co/3Hcnzj0Slx
https://t.co/sEwLWkn1Sz https://t.co/0Ei3EdQdXB",Twitter for iPhone
761025834350018561,http://twitter.com/realdonaldtrump/status/761025834350018561,2016-08-04 02:27:52,"Thank you Jacksonville, Florida!
#MakeAmericaGreatAgain
https://t.co/xrTQjt9WOC https://t.co/VSnBoQYoZs",Twitter for iPhone
760976212068106240,http://twitter.com/realdonaldtrump/status/760976212068106240,2016-08-03 23:10:41,"Thank you for your support of my candidacy! #MAGA #ImWithYou
https://t.co/Al5bZlRFYk",Twitter for iPhone
760960985524043777,http://twitter.com/realdonaldtrump/status/760960985524043777,2016-08-03 22:10:11,"Thank you to the amazing law enforcement officers today- in Daytona Beach, Florida! #LESM #MAGA https://t.co/QoxJf4Xzbc",Twitter for iPhone
@yanofsky
yanofsky / index.html
Created Apr 13, 2017
An issue i'm having with the d3 update pattern
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>US Map of Nielsen Media Markets</title>
</head>
<body>
<button data-month="Jan">
View keybase.md

Keybase proof

I hereby claim:

  • I am yanofsky on github.
  • I am yanofsky (https://keybase.io/yanofsky) on keybase.
  • I have a public key ASAtdhnt_0pr8wgeUzVYpw03u0DhRZgE4cj3DwkNm2XNxQo

To claim this, I am signing this object:

View index.html
<html>
<head>
<title>Perfect sp 500 graphic</title>
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
<script src="http://www.datejs.com/build/date.js" charset="utf-8"></script>
</head>
<body>
<style type="text/css">
@font-face {
View perfectSP500.py
#!/usr/bin/env python
# encoding: utf-8
import sys
import os
import csv
import datetime
#define market holidays
marketHolidays = ["2013-01-21","2013-02-18","2013-03-29","2013-05-27","2013-07-04","2013-09-02","2013-11-28","2013-12-25"]
View index.html
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>Text bbox issue</title>
</head>
<style type="text/css" media="screen">
@import url(http://fonts.googleapis.com/css?family=Cutive);
svg text {
You can’t perform that action at this time.