Skip to content

Instantly share code, notes, and snippets.

View robcowie's full-sized avatar

Rob Cowie robcowie

  • Recycleye
  • Leeds/London, United Kingdom
View GitHub Profile
@yu-iskw
yu-iskw / add.sh
Last active July 1, 2022 20:51
Example to add a airflow connection to google cloud platform
#!/bin/bash
airflow run add_gcp_connection add_gcp_connection_python 2001-01-01
@BryanCutler
BryanCutler / PySpark_Vectorized_UDFs.ipynb
Last active February 17, 2022 13:57
PySpark vectorized UDFs with Arrow
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@stared
stared / aspie_traits.md
Last active January 29, 2022 08:16
Interpersonal Traits of Aspies Placed in Context

Interpersonal Traits of Aspies Placed in Context

a chapter from A Mind-Body Look at the Concept of Asperger's Syndrome (pdf) by Michael Samsel, LMHC

A Hacker News discussion (2021) on this list

Uncommunicative Eye Contact

In humans, eye contact is the center of the attachment system. In Asperger's Syndrome there is either an avoidance of eye contact (most common) or an unvarying, relative unblinking, staring, constant eye contact (less common). Avoidant eye contact gives an impression of 'having something to hide', and also eliminates a big channel of communication and trust. Staring eye contact, because of its unchanging nature, is also uncommunicative, and is generally experienced as disturbing on the receiving end.

set mapred.job.queue.name=hddq-commrce-mktmisc;
set hive.auto.convert.sortmerge.join=true;
set hive.optimize.bucketmapjoin=true;
set hive.optimize.bucketmapjoin.sortedmerge=true;
set hive.auto.convert.sortmerge.join.noconditionaltask=true;
set hive.enforce.bucketing=true;
set hive.enforce.sorting=true;
drop table IF EXISTS pla_bucket_superset;
@eddies
eddies / setup-notes.md
Created July 29, 2016 08:00
Spark 2.0.0 and Hadoop 2.7 with s3a setup

Standalone Spark 2.0.0 with s3

###Tested with:

  • Spark 2.0.0 pre-built for Hadoop 2.7
  • Mac OS X 10.11
  • Python 3.5.2

Goal

Use s3 within pyspark with minimal hassle.

@bearfrieze
bearfrieze / comprehensions.md
Last active December 23, 2023 22:49
Comprehensions in Python the Jedi way

Comprehensions in Python the Jedi way

by Bjørn Friese

Beautiful is better than ugly. Explicit is better than implicit.

-- The Zen of Python

I frequently deal with collections of things in the programs I write. Collections of droids, jedis, planets, lightsabers, starfighters, etc. When programming in Python, these collections of things are usually represented as lists, sets and dictionaries. Oftentimes, what I want to do with collections is to transform them in various ways. Comprehensions is a powerful syntax for doing just that. I use them extensively, and it's one of the things that keep me coming back to Python. Let me show you a few examples of the incredible usefulness of comprehensions.

@heptal
heptal / volumes.md
Last active July 18, 2016 10:02
Removable volume manager in Hammerspoon

A simple menubar utility for opening/ejecting/managing removable volumes that looks good in OSX Dark mode:

Conveniently hides itself when no volumes are mounted and reappears when one is mounted:

Get it here - volumes.lua

Save as volumes.lua in ~/.hammerspoon/ and put volumes = require "volumes" in your init.lua

@muellermartin
muellermartin / rpicam-gstreamer.txt
Created February 3, 2016 01:03
Stream video from Raspberry Pi with camera attached to CSI port via RTP (UDP) using GStreamer
Useful Links:
- http://stackoverflow.com/questions/25941171/how-to-get-gstreamer1-0-working-with-v4l2-raspicam-driver
- http://raspberrypi.stackexchange.com/questions/26675/modern-way-to-stream-h-264-from-the-raspberry-cam
- http://stackoverflow.com/questions/13154983/gstreamer-rtp-stream-to-vlc
- http://cgit.freedesktop.org/gstreamer/gst-plugins-good/tree/gst/rtp/README
- http://archpi.dabase.com/#sending-and-receiving-pi-camera-video-over-the-network
- http://emmanuelgranatello.blogspot.de/2013/10/raspberry-pi-gstreamer-streaming-h264.html
- http://stackoverflow.com/questions/15712983/why-rtp-streaming-of-a-avi-video-file-fails-to-be-received
@heptal
heptal / amphetamine.md
Last active January 17, 2025 07:43
Hammerspoon replacement for Caffeine

Amphetamine

Simple toggleable menubar replacement for Caffeine in Hammerspoon, utilizing ASCIImage (for vector) to create the amphetamine icons. Motivated by the official Caffeine app's icon looking bad on Retina

Get latest version here: amphetamine.lua

Save as amphetamine.lua in ~/.hammerspoon/ and put amphetamine = require "amphetamine" in your init.lua

@salekseev
salekseev / hdfs-ha-namenode-failback.sh
Last active October 15, 2017 20:22
Script to check that both NameNodes are alive in HDFS HA configuration and will force failover to the preferred NameNode
#!/bin/bash
#
# This script will check that both NameNodes are alive in HDFS HA
# configuration and will force failover to the preferred NameNode.
#
# Author: Stas Alekseev <[email protected]>
#
ACTIVE_NAMENODE=nn1
STANDBY_NAMENODE=nn2