Skip to content

Instantly share code, notes, and snippets.

View IvanBond's full-sized avatar

Ivan Bondarenko IvanBond

View GitHub Profile
@tonmcg
tonmcg / Html.GetTables.pq
Last active May 14, 2018 19:13
M Language Helper Functions for HTML Parsing
let GetTables =
(url as text) =>
let
DOM = Text.FromBinary(Web.Contents(url)),
DOCTYPE =
let
DOCTag = "<!" & Text.BetweenDelimiters(DOM, "<!", ">") & ">"
in
DOCTag,
HTMLOpeningTag =
@Hugoberry
Hugoberry / UnZIP.m
Created February 10, 2017 11:35
UnZip in Power Query M
(ZIPFile) =>
let
Header = BinaryFormat.Record([ Signature = BinaryFormat.ByteOrder(BinaryFormat.UnsignedInteger32,ByteOrder.LittleEndian),
Version = BinaryFormat.ByteOrder(BinaryFormat.UnsignedInteger16,ByteOrder.LittleEndian),
Flags = BinaryFormat.ByteOrder(BinaryFormat.UnsignedInteger16,ByteOrder.LittleEndian),
Compression = BinaryFormat.ByteOrder(BinaryFormat.UnsignedInteger16,ByteOrder.LittleEndian),
ModTime = BinaryFormat.ByteOrder(BinaryFormat.UnsignedInteger16,ByteOrder.LittleEndian),
ModDate = BinaryFormat.ByteOrder(BinaryFormat.UnsignedInteger16,ByteOrder.LittleEndian),
CRC32 = BinaryFormat.ByteOrder(BinaryFormat.UnsignedInteger32,ByteOrder.LittleEndian),
CompressedSize = BinaryFormat.ByteOrde
@randomecho
randomecho / australian-postcodes.sql
Last active April 11, 2024 12:08
Australian postcodes (with states and suburb names) geocoded with latitude and longitude.
/*
Taken and cribbed from blog.datalicious.com/free-download-all-australian-postcodes-geocod
May contain errors where latitude and longitude are off. Use at own non-validated risk.
*/
SET NAMES utf8;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
DROP TABLE IF EXISTS postcodes_geo;