Skip to content

Instantly share code, notes, and snippets.

Justin Palmer caged

Block or report user

Report or block caged

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
View fix-jurisdictions.sql
bad_geometries AS (SELECT
(a.p_geom).path[1] AS path,
st_dump(shape) AS p_geom

Keybase proof

I hereby claim:

  • I am caged on github.
  • I am caged ( on keybase.
  • I have a public key ASBSVYNed5hAUR9evtZAZiOmAKi0Mg40LlXoSEWlX2e0hAo

To claim this, I am signing this object:

View flow-no.js
class A extends Component {
handleSomeEvent = (value: string) => {
/* do stuff */
render() {
return <B onSubmit={this.handleSomeEvent} />
View places.topo.json
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View index.html
<!DOCTYPE html>
<meta charset="utf-8">
<title>Test simple</title>
<script type="text/javascript">
'use strict';
var top = 1;
ndjson-join 'true' <(cat oregon.json) <(shp2json -n data/shp/arc_reference/ned_1arcsec_g.shp) \
| ndjson-filter -r jsts 'function(d) { var r = new, g1 =[0].geometry), g2 =[1].geometry); return !g1.intersection(g2).isEmpty() }.call(this, d)' \
| ndjson-map 'd[1]'
View coaches.rb
#!/usr/bin/env ruby
require 'csv''coaches2.csv')[1..-1]
stints = coach_years.sort_by(&:reverse).each_with_object([]) do |coach_year, coach_stints|
season, coach = coach_year
start_year = season.split('-')[0].to_i
end_year = start_year + 1
caged / coaches.csv
Last active May 7, 2016
Using Ruby, sort each coach by consecutive season tenures. Some seasons have two coaches which implies that the coach was fired/removed mid-season. The result should be something like [[name, start_season, end_season], [name, start_season, end_season]] where the order is by ascending start_season.
View coaches.csv
season coach
1994-95 Bill Blair
1995-96 Bill Blair
1990-91 Bill Musselman
1989-90 Bill Musselman
2006-07 Dwane Casey
2005-06 Dwane Casey
1999-00 Flip Saunders
2014-15 Flip Saunders
2004-05 Flip Saunders
caged /
Last active Apr 5, 2016
Examples of ordered set aggregates in Postgres

Examples of ordered set aggregates in Postgres.

SELECT round(avg(pie)::numeric, 2),
       percentile_cont(array[0.25, 0.5, 0.75, 0.95]) WITHIN GROUP (ORDER BY pie) AS percentiles
FROM player_stats_advanced
WHERE permode = 'pergame';

round | percentiles

You can’t perform that action at this time.