Skip to content

Instantly share code, notes, and snippets.

:octocat:
Thinking about: Data & Collaboration

Idan Gazit idan

:octocat:
Thinking about: Data & Collaboration
View GitHub Profile
@idan
idan / gist:9596928
Created Mar 17, 2014
Python ISO week for date
View gist:9596928
import datetime
def week_for_date(target):
"""Given a target date, return a start and end for that date's ISO week.
The returned tuple includes two datetime.date's, (start, end):
start: midnight on the first day of the ISO week containing the target
end: midnight on the first day following the ISO week containing the target
Note that the end date represents the first date _not_ in the target week,
@idan
idan / README.md
Last active Aug 29, 2015
Standardizing Pagerduty Timezones
View README.md

Standardizing Pagerduty Timezones

Do you consume the Pagerduty API? Are you annoyed that the timezones they use aren't standard IANA timezone names used by pretty much every timezone library that builds on the Olson TZ database?

Yeah, me too.

I dug around and found a mapping, however it had a few inconsistencies. I've gone down the list and verified each one. Here's a JSON for you. Enjoy!

Diff of the zones I altered is below as well.

View foo.py
from django.core.exceptions import ImproperlyConfigured
def get_env_variable(var_name):
""" Get the environment variable or return an exception """
try:
return os.environ[var_name]
except KeyError:
error_msg = "Set the {} environment variable".format(var_name)
raise ImproperlyConfigured(error_msg)
@idan
idan / _colors.scss
Created Jan 29, 2014
Flat UI colors
View _colors.scss
// Colors from http://designmodo.github.com/Flat-UI/
$color-turquoise: #1abc9c;
$color-green-sea: #16a085;
$color-emerland: #2ecc71;
$color-nephritis: #27ae60;
$color-peter-river: #3498db;
$color-belize-hole: #2980b9;
$color-amethyst: #9b59b6;
$color-wisteria: #8e44ad;
$color-wet-asphalt: #34495e;
@idan
idan / .slate
Created Jan 25, 2014
Idan's Slate Config
View .slate
# Idan's ~/.slate
# I don't even know what these do but they came in the default. Might not need 'em
config defaultToCurrentScreen true
config nudgePercentOf screenSize
config resizePercentOf screenSize
# Shows app icons and background apps, spreads icons in the same place.
config windowHintsShowIcons true
config windowHintsIgnoreHiddenWindows false
@idan
idan / gist:8296699
Last active Jan 2, 2016
PyCon and Passover
View gist:8296699

I love PyCon. And until 2016, I can’t go, because the organizers failed to open a calendar before scheduling the conference in conflict with Passover—for two years running.

This is the story of how a large population was casually excluded from an event that [assigns so much value to being inclusive][CoC]. I say “casually” because it has been almost an entire year since the organizers were made aware of their failure, and they haven’t communicated publicly about it once—not to own up to the problem, and not to take steps to prevent it from happening again. Given the swift actions following incidents ([1][pyconincident1], [2][pyconincident2], [donglegate][donglegate]) at PyCon, it’s hard to feel that this failure is being treated with any kind of gravity when it escapes mention for so long, so it’s time to speak up.

Before I dive into the details, I’d like to stress that I have no personal animus with the organizers, and any suggestions of malice or (sigh) “antisemitism” on their part are simply unfou

@idan
idan / sandstorm.md
Last active Dec 29, 2015
Sandstorm-in-an-app
View sandstorm.md

In a long-long-time-ago part of my life, I emerged one day from a bunker underground to discover that there was a roiling windstorm of fine, orange sand. In every direction, city buildings peeked out of the apocalypse orange fog, palm tree leaves stretched horizontally and snapping in the wind. I had spent all day indoors, under 60Hz fluorescent lighting. I stood just outside the vestibule of the building, looking around at the scene. Every fluorescent light, normally white, was intensely blue—my eyes attempting to normalize the unusually orange scene by adding a fuckton of blue to everything, making the cooler lights even bluer.

This was super-trippy to me, and the first time I looked away from a f.lux'ed screen, I was intensely reminded of the experience. And that's pretty much the barrier between me and f.lux. I like the science. But it totally fucks with me.

@idan
idan / gist:7399685
Created Nov 10, 2013
Can datavis at GitHub?
View gist:7399685

Hi there!

I’m a developer/designer hybrid, a Django core dev (and lead designer for same), and a generally polyglot creative geek. For a while now, I've been fantasizing about storytelling with data at GitHub. My last startup didn't work out, and I'm coming to SF for a week to meet with potential employers.

Here are a few things I’ve done recently:

  • http://bit.ly/polyglots — visualizing GitHub’s polyglot developers. A fun research project, very much a work-in-progress, but already some fascinating stories surfacing there. I gave a talk on the process of doing this at PyCon 2013.
  • http://pushpin.io — analytics for geo.
  • http://telostats.com — Hebrew (apologies), a visualization of Tel Aviv's municipal bike share.
  • http://gist.io — gist-based writing for hackers. Fairly popular little tool.
@idan
idan / gist:7356486
Created Nov 7, 2013
Getting hired remotely
View gist:7356486

I’m from Tel Aviv, but my heart is in San Francisco. The vicissitudes of life (my wife, her career, our kids) make it unlikely that I’ll relocate to the bay area now, but I’d like a job with one of the companies I love out there. I’m interviewing with them as an explicitly remote candidate.

I’m still in the thick of the process, but given the topic’s popularity lately (and my fortuitous timing with the release of 37Signals’ book on the subject), I’ve got a few practical observations to share about the process.

The book

I bought my copy via iBooks. I wish they also sold a DRM-free version directly à la O’Reilly, but I digress.

I’m only partway through the book. Much of it seems obvious to me as an open-source hacker comfortable with collaboration over the internet, but I can see that it’s a novel message for straitlaced businesses. Jason and David have a particular talent for distilling this brand of wisdom and packaging it in a form that management types can relate to (

View gist:7327850

I’m a developer/designer hybrid, a Django core dev (and lead designer for same), and a generally creative geek. I’m coming to SF to check out potential employers, and Balanced piqued my interest. I like the coding-in-the-open approach, and there are a lot of opportunities for datavis in your data.

Here are a few things I’ve done recently:

For good form, more about me: http://gazit.me. My CV is at http://gazit.me/cv.

You can’t perform that action at this time.