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
View gitcsvtest.ts
import Fiona from "https://deno.land/x/fiona/deno/index.js";
import { csvFormat, csvParse } from "https://cdn.pika.dev/d3-dsv";
const { writeTextFile, run, mkdir, stdout } = Deno;
const { now } = performance;
type Row = {
name: string;
date: Date;
bio: string;
p: number;
View helloargo.yml
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: artifact-passing-
spec:
entrypoint: artifact-example
templates:
- name: artifact-example
steps:
- - name: generate-artifact
View decaf_slack_theme.txt
#2D2525,#221C1C,#221C1C,#FFCB58,#221C1C,#968A8B,#99DF66,#FF935B,#221C1C,#968A8B
@idan
idan / Hospital Modeling Data.md
Created Mar 27, 2020
Data for Modeling COVID Things
View Hospital Modeling Data.md

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
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
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,
View component.jsx.hbs
import './style.scss'
import React, { PropTypes } from 'react'
export default class {{ componentName }} extends React.Component {
static propTypes = {
};
static defaultProps = {
};
@idan
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 gist.io, 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.