Skip to content

Instantly share code, notes, and snippets.

View AKST's full-sized avatar

Angus AKST

View GitHub Profile
@AKST
AKST / nswvg_property_sales_parser.py
Last active September 2, 2024 06:18
Parser for NSW Valuer General Bulk Property Sales data, found here https://valuation.property.nsw.gov.au/embed/propertySalesInformation
from dataclasses import dataclass
from datetime import datetime
from typing import Optional
import os
def get_property_sales_data(file_path):
reader = PropertySalesRowReader()
try:
for kind, row in reader.get_rows(file_path):
@AKST
AKST / nswvg_property_description_parser.py
Last active September 2, 2024 04:46
(Work in progress) NSW Valuer General Property Description Parser. This parsers the "property description" field of the bulk data. You're welcome to use this as you please.
from dataclasses import dataclass, field
from collections import namedtuple
from typing import List, Union, Any, Optional
import re
@dataclass
class LandParcel:
id: str
part: bool = field(default=False)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Copyright 2021 Angus Thomsen
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
@AKST
AKST / getgot.script
Created June 6, 2021 00:04
Lyrics of death grips get got roughly to the millisecond
# intro
16.000: [lyric] get
16.500: [lyric] get
17.000: [lyric] get
17.500: [lyric] get
18.000: [lyric] got
18.500: [lyric] got
19.000: [lyric] got
19.500: [lyric] got
@AKST
AKST / akst.obj
Last active November 3, 2020 12:44
# Blender v2.90.1 OBJ File: ''
# www.blender.org
mtllib akst.mtl
o Curve
v 1.000000 -0.088656 -3.474279
v 1.000000 -0.064552 -3.464055
v 1.000000 -0.039982 -3.454721
v 1.000000 -0.014946 -3.446275
v 1.000000 0.010554 -3.438719
v 1.000000 0.036521 -3.432051
class Controller {
@mobx.observable.ref count = 0;
@action
increment() {
this.count += 1;
}
}
// exposing a controller for a singleton component
def example_function(x, y, z):
return (x + y) * z
print(example_function(1, 2, 3)) # prints 9
print(example_function(1, 2, z=3)) # prints 9
print(example_function(x=1, y=2, z=3)) # prints 9
# will break your program, because positional arguments are
@AKST
AKST / refresh_os_appearance.fish
Last active June 24, 2019 12:40
I wrote a some fish shell that updates the operating systems appearance to use light mode during the day and dark mode during the evening.
#!/usr/bin/env fish
begin
function current_appearance
set output (osascript -l JavaScript -e "
Application('System Events').appearancePreferences.darkMode()
")
if test "$output" = "true"
echo "dark"
else
@AKST
AKST / deepcopy.js
Last active January 29, 2018 12:29
A function for deep copying objects, that makes the assumption that the constructors of these objects are stateless.
function deepcopy (value) {
// if it's anything other than an object
// than let immediately return it.
switch (typeof value) {
case 'object': break;
default: return value;
}
// If it's a null let also return that.
if (value === null) return value;