Skip to content

Instantly share code, notes, and snippets.

View okeeffdp's full-sized avatar

Daniel O'Keeffe okeeffdp

  • Dropbox
  • Dublin, Ireland
View GitHub Profile
@okeeffdp
okeeffdp / internalCommaRemover.py
Last active November 4, 2016 15:54
Function for parsing elements in csv files that contain internal commas. It requires that potential fields contain internal commas be wrapped in double quotes.
def removeInternalCommas(line):
sawComma = False
newLine = ''
for char in line:
if char == '"':
sawComma = False if sawComma else True
if sawComma and char == ",":
continue
newLine += char
@okeeffdp
okeeffdp / Seti_orig.tmTheme
Created October 13, 2016 14:38
The Seti_orig color scheme for sublime text
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Seti_Original</string>
<key>settings</key>
<array>
<dict>
<key>name</key>
@okeeffdp
okeeffdp / Package Control.sublime-settings
Last active September 23, 2020 10:34
Sublime Text 3 Packages Installed. A list of the packages I use.
{
"bootstrapped": true,
"in_process_packages": [
],
"installed_packages": [
"Anaconda",
"Apache Hive",
"AutoFileName",
"Babel",
"BracketHighlighter",
@okeeffdp
okeeffdp / user-preferences.sublime-settings
Last active September 23, 2020 13:55
Sublime Text 3 User Settings. The filename is for descriptive purposes only. Use the Preferences tab in the Menu to add new preferences.
{
"always_show_minimap_viewport": true,
"bold_folder_labels": true,
"caret_extra_bottom": 2,
"caret_extra_top": 2,
"caret_extra_width": 2,
"caret_style": "phase",
"color_scheme": "Packages/Materialize/schemes/Material Seti.tmTheme",
"drag_text": false,
"font_options":
@okeeffdp
okeeffdp / pkmn_stats.csv
Last active October 7, 2016 13:39
Pokemon stats csv taken from Kaggle.com datasets
num name type_1 type_2 total hp attack defense sp_atk sp_def speed generation legendary
1 Bulbasaur Grass Poison 318 45 49 49 65 65 45 1 False
2 Ivysaur Grass Poison 405 60 62 63 80 80 60 1 False
3 Venusaur Grass Poison 525 80 82 83 100 100 80 1 False
3 VenusaurMega Venusaur Grass Poison 625 80 100 123 122 120 80 1 False
4 Charmander Fire 309 39 52 43 60 50 65 1 False
5 Charmeleon Fire 405 58 64 58 80 65 80 1 False
6 Charizard Fire Flying 534 78 84 78 109 85 100 1 False
6 CharizardMega Charizard X Fire Dragon 634 78 130 111 130 85 100 1 False
6 CharizardMega Charizard Y Fire Flying 634 78 104 78 159 115 100 1 False
@okeeffdp
okeeffdp / c9.io_alias_for_jekyll.sh
Last active January 17, 2016 13:41
An alias for jekyll when using cloud9 (c9.io)
# Aliases for jekyll serve and jekyll build on Cloud 9 (c9.io)
alias jserve='jekyll serve --port $PORT --host $IP'
alias jbuild='jekyll build'
@okeeffdp
okeeffdp / commit_changes.sh
Last active January 20, 2016 01:44
A simple script to check if there are any changes in the specified directories. This is a test script for crontab (a bash scheduler). It will check for differences and if it finds some it will run two git commands. This is a test.
#!/usr/bin/env bash
# Set the path to the working tree
REPO_DIR='--work-tree=/path/to/repo/'
# Set the path to the repository
REPO_GIT='--git-dir=/path/to/repo/.git'
# If there are differences, then
if [[ $(git $REPO_GIT $REPO_DIR diff) ]]; then
# Find the untracked files. Filter their names so that only untracked sh and py files are added.