Skip to content

Instantly share code, notes, and snippets.

@gcardoso89
gcardoso89 / NextStopAustralia_LandingFest.md
Last active July 17, 2023 01:35
Landing.festival Lisbon 2018 - Next stop: Australia #LandingFest #CallForSpeakers

Talk proposal for Landing Festival 2018 - Lisbon #CallForSpeakers

Next stop: Australia!

TL;DR: Australia is hiring! 5 things you should know before applying.

We got used to see Australia’s biggest cities in the top positions of all quality of life rankings, and this was one of the reasons why I always had the dream to relocate to Australia. Now that I'm living in Sydney I can definitely confirm that’s true. However, getting an opportunity here is not that easy and the dream can easily become a nightmare.

Come on board and join this trip to the other side of the world, from the moment you take a decision to leave until you finally land in Australia. During the journey, I’ll share 5 useful tips I wish I would have known before stepping up and that will hopefully help you during your relocation to Australia.

@tomron
tomron / spark_aws_lambda.py
Created February 27, 2016 12:57
Example of python code to submit spark process as an emr step to AWS emr cluster in AWS lambda function
import sys
import time
import boto3
def lambda_handler(event, context):
conn = boto3.client("emr")
# chooses the first cluster which is Running or Waiting
# possibly can also choose by name or already have the cluster id
clusters = conn.list_clusters()
@Tritlo
Tritlo / TailRec.hy
Last active October 4, 2022 13:55
Proper Tail Recursion in Python
(defclass TailCall [Exception]
"An exeception to implement Proper Tail Recursion"
[[--init--
(fn [self __TCFunc &rest args &kwargs kwargs]
(setv self.func __TCFunc)
(setv self.args args)
(setv self.kwargs kwargs)
nil)]])
(defn TailRec [func]
@randomecho
randomecho / australian-postcodes.sql
Last active January 16, 2025 03:34
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;
@zhongwen
zhongwen / eudist_sse.cc
Created November 2, 2012 18:25
Euclidean distance with SSE
static inline float euclidean_baseline_float(const int n, const float* x, const float* y){
float result = 0.f;
for(int i = 0; i < n; ++i){
const float num = x[i] - y[i];
result += num * num;
}
return result;
}
static inline float euclidean_intrinsic_float(int n, const float* x, const float* y){
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active April 15, 2025 08:03
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'