Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.properties as $propertiess | { | |
"type": "FeatureCollection", | |
"features": [ | |
(.geometries[] | | |
{ | |
"type": "Feature", | |
"properties": (.properties + $propertiess), | |
"geometry": del(.properties) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Simple app that generates a podcasst XML feed for Radicalized | |
To be fair this could be easily adapted to any audiobook / set of NP3s - you'd | |
just need to change the image, the path to the music and all the descriptions. | |
Requires: | |
- feedgen | |
- flask |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir -p KML | |
for resolution in $(seq 1 3); do | |
h3ToHier ${resolution} | h3ToGeoBoundary 1 res${resolution}cells.kml "Res ${resolution} Cells" > KML/res${resolution}cells.kml | |
h3ToHier ${resolution} | h3ToGeo 1 res${resolution}centers.kml "Res ${resolution} Centers" > KML/res${resolution}centers.kml | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Marshmallow wrappers to produce GeoJSON instead of a flat dictionary. | |
""" | |
from flask_marshmallow import Marshmallow | |
import geoalchemy2 | |
from geoalchemy2.shape import from_shape, to_shape | |
from marshmallow import fields, pre_load, post_dump, ValidationError | |
import marshmallow_sqlalchemy as msqla | |
from shapely import geometry |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension"> | |
<_name>Source Code Text</_name> | |
<id>org.henry.poster_text</id> | |
<dependency type="executable" location="extensions">poster_text.py</dependency> | |
<dependency type="executable" location="extensions">inkex.py</dependency> | |
<param name="tab" type="notebook"> | |
<page name="Options" _gui-text="Options"> | |
<param name="directory" type="string" _gui-text="Directory to search for code:">~/</param> | |
<param name="pattern" type="string" _gui-text="Filename pattern to match:">py</param> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
from __future__ import print_function | |
from datetime import date, timedelta, datetime | |
import json | |
from time import sleep | |
from twython import Twython, TwythonRateLimitError | |
APP_KEY = 'YOUR_APP_KEY' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import arcpy | |
import pandas as pd | |
def build_df_from_arcpy(table, index_col=None): | |
""" | |
Build a pandas dataframe from an ArcGIS Feature Class. | |
Uses the arcpy Search Cursor to loop over a feature class in pandas and | |
generate a pandas dataframe. If the dataset is a feature class with a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
station | date | mm | |
---|---|---|---|
Footscray | 8/3/15 | 0.20 | |
Footscray | 15/3/15 | 0.00 | |
Footscray | 22/3/15 | 1.60 | |
Footscray | 29/3/15 | 0.80 | |
Footscray | 5/4/15 | 0.00 | |
Footscray | 12/4/15 | 5.20 | |
Footscray | 19/4/15 | 8.00 | |
Footscray | 26/4/15 | 8.00 | |
Footscray | 3/5/15 | 0.60 |
NewerOlder