Skip to content

Instantly share code, notes, and snippets.

View thomas4g's full-sized avatar

Thomas Shields thomas4g

  • Atlanta
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
@thomas4g
thomas4g / disk_usage.sh
Created October 11, 2016 14:49
Checks disk usage and rings bell forever if > 90%
#!/bin/bash
# TODO: don't hard-code the disk in the grep command
raw_usage=$(df -h | grep -e "50G" | xargs | cut -d' ' -f4)
usage=${raw_usage//%}
echo $raw_usage
if [ $usage -gt 90 ]; then
while (true); do
tput bell
sleep 1

Sentiment Analysis

  1. Tokenization
  2. Lowercase
  3. Other cleanup?
  4. Word Tagging (weight each word with pos/neg score depending on frequency and inverse doc frequency)
  5. Other Approaches
  6. Bigrams
  7. Trigrams
  8. Sentence Structure
  9. POS usage
@thomas4g
thomas4g / git-templating-options.md
Last active September 15, 2015 08:07
Comparison of Templating Options for Git

#Raw Git: Setup: None

Template is stored at: https://github.gatech.edu/cs1331/hw-template ##Creating a new one from template:

  1. Create hw-name on github
  2. Clone repo onto local box, e.g git clone https://github.gatech.edu/cs1331/hw-name.git
  3. cd hw-name and git remote add template https://github.gatech.edu/cs1331/hw-template.git
  4. git pull template master
@thomas4g
thomas4g / Hi Jacob
Last active August 29, 2015 14:08
Sample Gist
Hi Jacob, oops, forgot something.
@thomas4g
thomas4g / agency-10-7-14-worksession-email.md
Last active August 29, 2015 14:07
email for 10/7/14's work session

Hey everyone!

Tonight's another Agency work session night! Unfortunately, several of our officers will be gone for tests/school events, so we're going to have a bit of a different approach tonight.

First off, if anyone did any work over the past week - discuss it amongst yourselves - tell what you did, what you found, etc. Additionally, if anyone would like to put this work up on the Agency's github, at the end of this message is a set of instructions for doing so.

Now, as far as the meeting: I've settled on some tasks that hopefully you all can accomplish during today's meeting. Work together! Share screens, communicate. I'll do my best to stop by as soon as my test is over if you guys are still working. All of this is flexible - I'm not in charge here - this is y'alls project! Feel free to change it up, do something different - this is just a set of suggestions for how I think we should progress.

Remember, there is no meeting next Tuesday due to Fall Break, so let's try to get a lot done before the mee

@thomas4g
thomas4g / rough-projects.md
Last active August 29, 2015 14:06
tentative rough project ideas

##Game AI: - Dnd DM AI -- rougelike generator? - Foosball AI -- No

##CV: - Lip Reading -- technological issues - Facial Rec w/ Social Integration (personal highlights) - Eye Typing/Eye Input -- technological issues could be like a 3week project - Sign Language (or use Leap Motion)

  • Freshmen Detector
@thomas4g
thomas4g / jsmetro
Created September 13, 2012 21:40
Base JS for Windows 8 Metro App
(function () {
"use strict";
WinJS.Binding.optimizeBindingReferences = true;
var app = WinJS.Application;
var activation = Windows.ApplicationModel.Activation;
WinJS.strictProcessing();
app.onactivated = function (args) {
@thomas4g
thomas4g / gist:2222844
Created March 28, 2012 02:01
JS Knight

##The Programmer's Tales: Prologue ###The Knight

Thomas Shields

There was a geek, a most distinguished man

Who from the day on which he first began

to code JS had done so elegantly -

@thomas4g
thomas4g / gist:2221303
Created March 27, 2012 23:06
using Utils
var messages = document.getElementById("messages"),
i=0;
for(;i<Mail.messages.length;i++) {
function addSender(m, row) {
var cell = row.insertCell(-1);
Utils.traversal.setText(m.from.name, cell);
}
function addSubject(m, row) {
var cell = row.insertCell(-1);
Utils.traversal.setText(m.subject, cell);