Skip to content

Instantly share code, notes, and snippets.

View coreyk's full-sized avatar
🏠
Working from home

Corey Kaiser coreyk

🏠
Working from home
View GitHub Profile
@coreyk
coreyk / ml-recs.md
Created July 23, 2021 18:59 — forked from bsletten/ml-recs.md
Machine Learning Path Recommendations

This is an incomplete, ever-changing curated list of content to assist people into the worlds of Data Science and Machine Learning. If you have a recommendation for something to add, please let me know. If something isn't here, it doesn't mean I don't recommend it, I just may not have had a chance to review it yet or not.

I will generally list things in order of easier to more formal/challenging content.

It may feel like there is an overwhelming amount of stuff for you to learn (because there is). But, there is a guided path that will get you there in time. You need to focus on Linear Algebra, Calculus, Statistics and probably Python (or R). Your best bet is to get a Safari Books Online account (https://www.safaribooksonline.com) which you may already have access to through school or work. If not, it is a reasonable way to get access to a tremendous number of books and videos.

I'm not saying you will get what you need out of everything here, but I have read/watched at least some of all of the following an

# a simple dashboard for the waveshare 2in7b screen
# to be ran inside: https://github.com/waveshare/e-Paper/tree/master/RaspberryPi%26JetsonNano/python/examples
# 1. install the latest versions of `pyowm` and `requests`
# 2. edit `OPEN_WEATHER_KEY`, `LOCATION`, and `NEWS_API_KEY`
import sys
import os
picdir = os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), 'pic')
libdir = os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), 'lib')
if os.path.exists(libdir):
@coreyk
coreyk / iam-assume-role.sh
Created November 28, 2019 02:11 — forked from ambakshi/iam-assume-role.sh
Assume an IAM role. An interesting way of doing IAM roles is to give the instance permissions to assume another role, but no actual permissions by default. I got this idea while setting up security monkey: http://securitymonkey.readthedocs.org/en/latest/quickstart1.html#setup-iam-roles.
#!/bin/bash
#
# Assume the given role, and print out a set of environment variables
# for use with aws cli.
#
# To use:
#
# $ eval $(./iam-assume-role.sh)
#
@coreyk
coreyk / aws-creds.bash
Created November 28, 2019 01:54 — forked from ddgenome/aws-creds.bash
Fetch AWS STS keys and set environment variables
#!/bin/bash
# Fetch 24-hour AWS STS session token and set appropriate environment variables.
# See http://docs.aws.amazon.com/cli/latest/reference/sts/get-session-token.html .
# You must have jq installed and in your PATH https://stedolan.github.io/jq/ .
# Add this function to your .bashrc or save it to a file and source that file from .bashrc .
# https://gist.github.com/ddgenome/f13f15dd01fb88538dd6fac8c7e73f8c
#
# usage: aws-creds MFA_TOKEN [OTHER_AWS_STS_GET-SESSION-TOKEN_OPTIONS...]
function aws-creds () {
local pkg=aws-creds
@coreyk
coreyk / install-tmux.sh
Last active November 8, 2019 15:09 — forked from pokev25/install-tmux.sh
Install tmux 2.9a on centos 7.6
# Install tmux 2.9a on Centos
# install deps
yum install gcc kernel-devel make ncurses-devel
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL
curl -LOk https://github.com/libevent/libevent/releases/download/release-2.1.11-stable/libevent-2.1.11-stable.tar.gz
tar -xf libevent-2.1.11-stable.tar.gz
cd libevent-2.1.11-stable
./configure --prefix=/usr/local

Last updated: 2017-03-18

Searching for Files

Find images in a directory that don't have a DateTimeOriginal

exiftool -filename -filemodifydate -createdate -r -if '(not $datetimeoriginal) and $filetype eq "JPEG"' .

###Output photos that don't have datetimeoriginal to a CSV### Note this can take a long time if you have a lot of jpgs

Keybase proof

I hereby claim:

  • I am coreyk on github.
  • I am coreyk (https://keybase.io/coreyk) on keybase.
  • I have a public key ASAOxW9K4NNG1yD2dIj2pXpcFO0xOP00iTEBk77spCBPKAo

To claim this, I am signing this object:

@coreyk
coreyk / athena_ddl
Created March 5, 2019 16:21 — forked from Sjeanpierre/athena_ddl
Cloudflare logs Athena DDL - Create Athena schema for Cloudflare logs
CREATE EXTERNAL TABLE `cf_logs`(
`cachecachestatus` string COMMENT 'from deserializer',
`cacheresponsebytes` int COMMENT 'from deserializer',
`cacheresponsestatus` int COMMENT 'from deserializer',
`cachetieredfill` boolean COMMENT 'from deserializer',
`clientasn` int COMMENT 'from deserializer',
`clientcountry` string COMMENT 'from deserializer',
`clientdevicetype` string COMMENT 'from deserializer',
`clientip` string COMMENT 'from deserializer',
`clientipclass` string COMMENT 'from deserializer',
@coreyk
coreyk / viscosity-to-ios-connect.rb
Created June 30, 2017 18:45 — forked from chrisboulton/viscosity-to-ios-connect.rb
Quickly convert all of your Viscosity connections into OVPN configuration files for OpenVPN for iOS (bundles certificates and keys in the files too)
config_files = Dir.glob("#{ENV['HOME']}/Library/Application Support/Viscosity/OpenVPN/*/config.conf")
config_files.each do |file|
certificate_files = ['ca', 'cert', 'key', 'tls-auth']
config_dir = File.dirname(file)
connection_name = nil
new_config = []
File.read(file).each do |line|
line.strip!
@coreyk
coreyk / gist:a893e26c922dd8f9009da9739eadc875
Created June 12, 2016 22:48
Compare current folder to Time Machine backup via Terminal
tmutil compare -s '/Volumes/TIMEMACHINEDRIVE/Backups.backupdb/COMPUTERNAME/201X-XX-XX-XXXXXX/VOLUMENAME/FOLDERNAME' /Volumes/VOLUMENAME/FOLDERNAME/