This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[ Arithmetic Expression Tree Program Skeleton | |
Recursive Function Version with Record-style Nodes | |
H. Conrad Cunningham, Professor | |
Computer and Information Science | |
University of Mississippi | |
Developed for CSci 658, Software Language Engineering, Fall 2013 | |
1234567890123456789012345678901234567890123456789012345678901234567890 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Title: Edit Distance | |
# Authors: Clay McLeod | |
# Description: Python edit distance problem | |
# Section: Python | |
# Subsection: Interesting Problems | |
import sys | |
from tabulate import tabulate | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Credit | |
% Understanding how to plot the United Stats map (no help was received from this page on the simulated annealing): | |
% - http://www.mathworks.com/help/optim/ug/travelling-salesman-problem.html | |
% | |
% ---- Initial variable setup ---- | |
clear all; | |
temp = 100; | |
cooling_rate = 0.01; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Title: Sort nuts and bolts | |
# Authors: Clay McLeod | |
# Description: Solving the classic sorting of nuts and bolts problem. | |
# Section: Python | |
# Subsection: Interesting Problems | |
# | |
# Problem description: http://www.geeksforgeeks.org/nuts-bolts-problem-lock-key-problem/ | |
import sys | |
import random |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
----------------------------------------------------------------------- | |
-- | |
-- Haskell: The Craft of Functional Programming, 3e | |
-- Simon Thompson | |
-- (c) Addison-Wesley, 1996-2011. | |
-- | |
-- Chapter 12, Section 3: Recognizing Regular Expressions | |
-- | |
------------------------------------------------------------------------ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Title: Max subarray | |
# Authors: Clay McLeod | |
# Description: Finds the max subarray of an array of integers, in O(nlogn) time | |
# Section: Python | |
# Subsection: Interesting Problems | |
# | |
# Problem description - http://en.wikipedia.org/wiki/Maximum_subarray_problem | |
import sys |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import os | |
import csv | |
import math | |
import datetime | |
from optparse import OptionParser | |
TIME_FORMAT = '%Y,%m,%d,%H,%M,%S' | |
TIME_HEADERS = 'year,month,day,hour,minute,second' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# Title: Reddit Data Mining Script | |
# Authors: Clay McLeod | |
# Description: This script mines JSON data | |
# from the Reddit front page and stores it | |
# as a CSV file for analysis. | |
# Section: Python | |
# Subsection: Data Science | |
want=["domain", "subreddit", "subreddit_id" "id", "author", "score", "over_18", "downs", "created_utc", "ups", "num_comments"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// PRKeystrokeProfile.m | |
// | |
// The MIT License (MIT) | |
// | |
// Copyright (c) 2014 Clay McLeod. All rights reserved. | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Application.h | |
// | |
// The MIT License (MIT) | |
// | |
// Copyright (c) 2014 Clay McLeod. All rights reserved. | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights |