Skip to content

Instantly share code, notes, and snippets.

David Quinn djq

  • Dublin
Block or report user

Report or block djq

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 skyscanner_flight_calcs
# Docs
# https://rapidapi.com/skyscanner/api/skyscanner-flight-search?endpoint=5a9b572de4b06ec3937b1296
#
# Using the skyscanner API
# install unirest into virtual env "flight"
#
# activate virtualenv
#
View table_summary.R
# https://stackoverflow.com/questions/23629592/how-can-i-select-the-top-2-values-in-a-column-per-column-and-report-this-with-bo
t <- structure(c(0.333333333333333, 0.333333333333333, 0.333333333333333,
0.333333333333333, 0.333333333333333, 0.333333333333333, 0.166666666666667,
0.166666666666667, 0.166666666666667, 0.166666666666667, 0.166666666666667,
0.166666666666667, 0.166666666666667, 0.166666666666667, 0.166666666666667,
0.166666666666667, 0.166666666666667, 0.166666666666667, 0.333333333333333,
0.333333333333333, 0.333333333333333, 0.333333333333333, 0.333333333333333,
0.333333333333333), .Dim = c(6L, 4L), .Dimnames = list(c("1",
"2", "3", "4", "5", "6"), c("123", "124", "125", "126")))
@djq
djq / network_visualization.R
Created May 7, 2017
R network visualizations
View network_visualization.R
# examples from: http://kateto.net/network-visualization
library('igraph')
library('network')
library('sna')
library('ndtv')
library('visNetwork')
# load data
setwd('/Users/djq/Desktop/net-viz/data')
@djq
djq / sotm.md
Last active Aug 29, 2015
OpenStreetMap Conference - NYC June 2015
View sotm.md
@djq
djq / gist:58558ac644a6c15f52ac
Last active Nov 2, 2015
Intro to spatial data using django
View gist:58558ac644a6c15f52ac
# ----
# Background
# ----
#
# Vectors:
# vectors consist of points, lines, polygons
# Within GeoDjango, data-types which are multipolygon and geometry also exist
#
# Projections:
# Projection systems facilitate translating data between a 3D and 2D space.
View gist:0f9eae4a4ca4103abf04
Verifying that +djq is my openname (Bitcoin username). https://onename.com/djq
@djq
djq / unions
Created Nov 22, 2014
How to union a list of geometries in GeoDjango
View unions
from django.contrib.gis.geos import GEOSGeometry
# sample data
geom_1 = GEOSGeometry('POLYGON((-71.8 42.1,-70.6 42.1,-70.5 41.2,-71.8 41.2,-71.8 42.1))')
geom_2 = GEOSGeometry('POLYGON((-71.12 42.23,-71.48 42.34,-71.52 42.55,-71.12 42.23))')
geom_3 = GEOSGeometry('POLYGON((-73.12 42.23,-71.48 42.34,-71.52 42.55,-73.12 42.23))')
polygons = [geom_1, geom_2, geom_3]
# get first polygon
polygon_union = polygons[0]
@djq
djq / Short.Films
Created May 9, 2014
short films I like
View Short.Films
Elephant Seals:
https://vimeo.com/93175979
Love Is Making Its Way Back Home (Josh Ritter):
https://www.youtube.com/watch?v=dzMN0TTpblg
View djangoeb.js
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "AWS CloudFormation Template: This template installs a single-instance with dev environment for elastic beanstalk as well as Jenkins server. This template creates an Amazon EC2 instance. You will be billed for the AWS resources used if you create a stack from this template.",
"Parameters" : {
"EC2Tag" : {
"Description" : "EC2 tag name",
"Type" : "String"
},
View index.html
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>Testing Pie Chart</title>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?2.4.5"></script>
<!-- Source for example located at: http://bl.ocks.org/1203641 -->
You can’t perform that action at this time.