Skip to content

Instantly share code, notes, and snippets.

View dokeeffe's full-sized avatar

Derek OKeeffe dokeeffe

  • Dell EMC
  • Cork Ireland
View GitHub Profile
import glob, os
from PIL import Image, ImageFont, ImageDraw
# Script used to generate https://www.youtube.com/watch?v=CYZBLVuM4nU
# run this command after this script runs > ffmpeg -framerate 15 -pattern_type glob -i '/home/dokeeffe/Desktop/xo-2b-transit-allsky/*.jpg' -c:v libx264 ~/Desktop/xo-2b-transit-allsky/allsky$.mp4
plot_image = Image.open('/home/dokeeffe/Pictures/Selection_037.png')
fit_image = Image.open('/home/dokeeffe/Pictures/Selection_038.png')
data_files = glob.glob('/home/dokeeffe/Desktop/xo-2b-transit-allsky/all*.jpg')
start_whiteout = 220
from astropy.io import fits
import glob
import numpy as np
from astropy import units as u
from astropy.time import Time
from astropy.coordinates import SkyCoord, EarthLocation, AltAz
data_files = glob.glob('/home/dokeeffe/Pictures/xo-2b/*.fits')
for file in data_files:
@dokeeffe
dokeeffe / face_saver.py
Created July 12, 2018 07:35
Capture and save faces from a webcam
import cv2, time
cap = cv2.VideoCapture(0)
cap.set(3, 640) #WIDTH
cap.set(4, 480) #HEIGHT
face_cascade = cv2.CascadeClassifier('/home/okeefd3/.local/lib/python3.6/site-packages/cv2/data/haarcascade_frontalface_default.xml')
face_counter = 0
while(True):
@dokeeffe
dokeeffe / stashy-prs.ipynb
Created August 8, 2018 12:37
Count all PRs merged between 2 dates
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dokeeffe
dokeeffe / SQM+Moon-plot.ipynb
Created March 20, 2019 00:00
Plotting sky brightness and moon visibility from a rural location in Ireland
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.