Skip to content

Instantly share code, notes, and snippets.

Avatar

Tim Martin t-mart

View GitHub Profile
View kinesis.py
kinesis = boto3.client(
'kinesis',
region_name=awsRegion,
aws_access_key_id=accessKeyId,
aws_secret_access_key =secretAccessKey
)
View lol.js
function getEntriesFromAElements(element) {
return element.querySelectorAll('a')
.map(e => ({ e.text : e.getAttribute('href') } ));
}
@t-mart
t-mart / lol.py
Created September 28, 2019 21:55
View lol.py
for i in range(5):
print(i)
View nyquist.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View test.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View np_sort.py
# create a list of 2d indices of A in decreasing order by the size of the
# (real) entry of A that they index to
def sortedIndices(A):
indexList = [(i,j) for i in range(A.shape[0]) for j in range(A.shape[1])]
indexList.sort(key=lambda x: -A[x])
return np.array(indexList)
@t-mart
t-mart / README.md
Created December 4, 2018 16:41
xmlto does not validate xmlto: Fix document syntax or use --skip-validation option I/O error : Attempt to load network entity dtd warning: failed to load external entity D DocBook XML V4.5//EN"
View README.md

Problem

When compiling git from source, I often run into this problem:

% make prefix=$HOME all doc info
    SUBDIR git-gui
    SUBDIR gitk-git
    SUBDIR templates
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C Documentation all
View gist:b9b0d0455319c970940f8a18a60941de
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: ingress
spec:
rules:
- http:
paths:
- path: /
backend:
@t-mart
t-mart / boomerang.zsh
Created October 14, 2018 01:49
Creates a "boomerang" movie clip.
View boomerang.zsh
#!/usr/bin/env zsh
set -ex
INPUT_FILE_PATH=${INPUT:a}
INPUT_DIR=${INPUT:a:h}
INPUT_EXT=${INPUT:e}
REVERSE_FILE_PATH="${INPUT_DIR}/reverse.${INPUT_EXT}"
FORWARD_FILE_PATH="${INPUT_DIR}/forward.${INPUT_EXT}"
@t-mart
t-mart / forensic_files.json
Last active January 12, 2022 06:16
Forensic Files Episodes on Netflix
View forensic_files.json
[
{
"netflix_collection_number": 1,
"netflix_episode_number": 1,
"title": "If I Were You",
"series_number": 285,
"season": 11,
"season_number": 28,
"air_date": "2007-01-24"
},