Skip to content

Instantly share code, notes, and snippets.

View neilernst's full-sized avatar
🐵

Neil Ernst neilernst

🐵
View GitHub Profile
--==============================
-- Send Keynote Text to Desktop Markdown File
-- Formats the markdown as Marp syntax (a MarkDown presentation format) https://marp.app
-- Based on
-- Writted By: Richard Dooling https://github.com/RichardDooling/
-- Based on
-- Send Keynote Presenter Notes to Evernote
-- Version 1.0.1
-- Written By: Ben Waldie <ben@automatedworkflows.com>
-- http://www.automatedworkflows.com
# author N Ernst
# thanks to https://stackoverflow.com/questions/4576077/python-split-text-on-sentences?rq=1
import nltk.data
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("length", help="recommended sentence length [default 5]", type=int, default=0)
parser.add_argument("filename", help="what text file to parse")
args = parser.parse_args()
@neilernst
neilernst / gh_issues_commits.py
Created December 2, 2016 17:47
Python3 script to take a directory of Github issues and find the related files changed
# Retrieve, for a list of issues, the associated commits and files
# First run Octohub's offline issues plugin: https://github.com/turnkeylinux/octohub/tree/master/contrib/offline-issues
# Assumes relevant issue data stored in octohub "all" dir
# Author: @neilernst
# Copyright: SEI
# Licence: BSD
import logging, os, sys
import simplejson as json
from octohub.connection import Connection
@neilernst
neilernst / github-mining.sql
Last active July 20, 2016 15:18 — forked from thomasdarimont/github-mining.sql
Sample query for github dataset in big-query
SELECT
cont.sample_repo_name,
repo.watch_count
FROM
[bigquery-public-data:github_repos.sample_contents] as cont
JOIN [bigquery-public-data:github_repos.sample_repos] as repo
ON cont.sample_repo_name = repo.repo_name
WHERE
cont.content CONTAINS 'spring-boot-starter-security</artifactId>'
AND cont.sample_path LIKE 'pom.xml'
@neilernst
neilernst / dblp_authors.py
Created November 30, 2015 17:39
Retrieves a list of authors by screen-scraping DBLP tags. Currently set for SCAM, change base_url for your conference. Runs best with Python3 due to Unicode names.
from lxml import html
import requests
import operator
authors_dict = {}
base_url = 'http://dblp.uni-trier.de/db/conf/scam/scam'
for year in range(2000,2016):
page = requests.get(base_url + str(year) + '.html')
tree = html.fromstring(page.content)
authors = tree.xpath('//span[@itemprop="author"]/a/span[@itemprop="name"]/text()')

Keybase proof

I hereby claim:

  • I am neilernst on github.
  • I am neilernst (https://keybase.io/neilernst) on keybase.
  • I have a public key whose fingerprint is 326B 3002 3D6B 243D 0CD9 FC83 8829 9F43 94E4 CA63

To claim this, I am signing this object:

@neilernst
neilernst / thesis.mmd
Created July 27, 2011 14:40
Markdown version of main thesis body
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@neilernst
neilernst / ut-thesis-end.tex
Created July 27, 2011 14:37
Latex footer for Scrivener output
% Included after body of thesis.
% Back Matter
%
% \backmatter
% \appendixpage
% Bibliography
\bibliographystyle{\bibliostyle}
\bibliocommand
@neilernst
neilernst / thesis-body.tex
Created July 27, 2011 14:35
Sample body of Latex thesis
\def\bibliocommand{\bibliography{IEEEabrv,../../bibtex/thesis-new}}
\def\bibliostyle{plainnat-nourl}
\def\mytitle{Software Evolution: a Requirements Engineering Approach}
\def\myauthor{Neil Alexander Ernst}
\input{ut-thesis-begin} % the preceding lines are directly converted from Scrivener Meta-Data.
\chapter{Introduction}
\label{introduction}
\section{Motivation}
@neilernst
neilernst / ut-thesis-begin.tex
Created July 27, 2011 14:32
Scrivner/Ut-thesis preamble
\RequirePackage[debrief,save]{silence}
% %silence filters. I use this with a custom script to pretty-print missing refs.
%\WarningFilter*{latex}{Citation `\@citeb' on page \thepage \space undefined}
\WarningFilter*{natbib}{Citation `\@citeb' on page \thepage \space undefined}
\WarningFilter*{latex}{Label}% `\@thelabel' multiply defined.}
\WarningFilter*{latex}{Reference}% `sec:ASK' on page \thepage undefined}
\documentclass[10pt,oneside]{ut-thesis} %draft
\usepackage{etex}
\makeindex