Skip to content

Instantly share code, notes, and snippets.

Thinking about: Data & Collaboration

Idan Gazit idan

Thinking about: Data & Collaboration
View GitHub Profile
View gitcsvtest.ts
import Fiona from "";
import { csvFormat, csvParse } from "";
const { writeTextFile, run, mkdir, stdout } = Deno;
const { now } = performance;
type Row = {
name: string;
date: Date;
bio: string;
p: number;
View helloargo.yml
kind: Workflow
generateName: artifact-passing-
entrypoint: artifact-example
- name: artifact-example
- - name: generate-artifact
View decaf_slack_theme.txt
idan / Hospital Modeling
Created Mar 27, 2020
Data for Modeling COVID Things
View Hospital Modeling

Model and Underlying Data

Data about Hospitals

Total number of beds by state draws upon aggregates from this report from ESRI based on Definitive Healthcare.

idan / gist:c27b2dd45a78273af848
Created Oct 8, 2014
Exploding Postgres HSTORE columns in Pandas
View gist:c27b2dd45a78273af848
def explode_hstore(df, column):
"""Explode a column of a dataframe containing PostgreSQL hstore k-v pairs in the format of:
"foo"=>"bar", "baz"=>"quux", ...
Every key becomes a column. If a given row's pairs doesn't have a key, then the resulting column's value
will contain NaN.
# split the tags column out as a new series, and break up each k=>v pair
s = df[column].str.split(', ').apply(pd.Series, 1).stack()
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'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,
View component.jsx.hbs
import './style.scss'
import React, { PropTypes } from 'react'
export default class {{ componentName }} extends React.Component {
static propTypes = {
static defaultProps = {
idan / gist:1385165
Created Nov 22, 2011
rel=logo enhancements
View gist:1385165
rel=logo is lovely.
I have a few ideas on making it better. The core idea is great, but if we're
pushing a new thing, we have an opportunity to encourage web developers to
provide more than just a single color logo. All of the ideas below are optional
enhancements for anybody wanting to use rel=logo on their site.
View gist:3135754

Hello there! This is a sample post for, a super-lightweight writing soapbox for hackers.

Now look up. Further. Above the post title. See that grey text with the gist ID?

Now back to me. That grey text is a link! Open that sucker in a new tab to see the source for this post. Also, I'm on a horse.

This is a major heading

If you peek at it with a web inspector, you'll see that it is a second-level heading. You can use first level headings, but they'll look just like the second level ones, and the gods of the HTML5 outlining algorithm will frown upon you.

You can’t perform that action at this time.