Skip to content

Instantly share code, notes, and snippets.

import sys
from awsglue.transforms import *
from awsglue.utils import getResolvedOptions
from pyspark.context import SparkContext
from awsglue.context import GlueContext
from awsglue.job import Job
## @params: [JOB_NAME]
args = getResolvedOptions(sys.argv, ['JOB_NAME'])
@brentarias
brentarias / query.sql
Last active February 14, 2019 13:35
DB Inspection Overview
################
# 1. Catalog of DB's
################
EXEC sp_helpdb;
################
# 2. Fetch file structure metadata
################
SELECT  
fg.name AS [File_Group_Name], 
@brentarias
brentarias / LenovoYoga910.ahk
Last active August 31, 2019 23:44
AutoHotkey script for Lenovo Yoga that re-maps keyboard for touch-typists.the 'Home' and 'End' key on the Acer Aspire 14 2-in-1.
;USE 'Ctrl-/' TO TOGGLE 'UP' ARROW INTO 'SHIFT' KEY.
^/::bigShift:=!bigShift
#If bigShift
Up::RShift
#If
;REPLACE 'INSERT' AND 'DELETE' WITH 'HOME' AND 'END' KEYS.
Del::End
Insert::Home
;MOVE 'DELETE' KEY TO Shift-Backspace
@brentarias
brentarias / commands
Last active April 8, 2017 21:45
PHX-AI-ML
#!/bin/bash
tail -n 10000 train.csv > validate.csv
head -n -10000 train.csv > train0.csv;mv train0.csv train.csv
wc -l train.csv;wc -l validate.csv;wc -l test.csv
@brentarias
brentarias / CcdCalc.cs
Last active January 15, 2021 19:49
Cumulative Component Dependency (CCD)
//This code is an algorithm for computing a "health metric" representing software architectural maintainability and testability.
//It could also be called a "coupling metric", as excessive coupling degrades maintainability and testability.
//The metric is called Cumulative Component Dependency (CCD).
// CCD = sum over all components C in a subsystem of the number
// of components needed in order to test each C incrementally.
//More info:
//https://baruzzo.wordpress.com/2009/08/22/how-testable-is-a-software-architecture/
//CCD should also account for cyclical dependencies, but this current
//implementation does not handle cyclical dependencies.
@brentarias
brentarias / AcerR5.ahk
Last active September 30, 2016 22:50
AutoHotkey script for programmers, that maps the 'Home' and 'End' key on the Acer Aspire 14 2-in-1.
Pause::Home
Insert::End
^t::
Run, notepad.exe
Return
#s::
Run, SnippingTool.exe
Return
@brentarias
brentarias / Development.ps1
Last active March 18, 2023 20:39
Powershell chocolatey script for building a software developer's machine.
#Visual Studio already installs GIT, but the VS
#version is usually older and does not make available
#useful tools, such as "git bash".
choco install -y git.install
#choco install -y python2
#choco install -y anaconda3
choco install -y sql-server-management-studio
choco install -y vscode
#choco install -y visualstudio2017community
choco install -y docker-desktop