This file contains 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
#Purpose: Removes all duplicate strings from a csv | |
#Author: Jake Gaylor | |
#Written: June 8th, 2012 | |
import csv | |
#initiate the csv reader | |
reader = csv.reader(open('words.csv','rU'), delimiter=",", quotechar='|') | |
#open the target file | |
target = open('trimmed_list.txt', 'w+') |
This file contains 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
class MyClass: | |
def __init__(self, name): #this is your constructor | |
self.active = False #this is an atrribute of the object... because we are setting it without a parameter we will call this one a 'default' value | |
self.name = name #we set this attribute from a parameter | |
def rename(self, newname): | |
self.name = newname | |
return True | |
def __str__(self): #this is the function that will be called any time you try to print an instance of the class. |
This file contains 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
# linked_list.py | |
# A simple link-based list example | |
""" | |
linked_list - An link-based list implementation for Python. | |
Emulates an link-based list implementation via an internal collection of | |
linked-list nodes. Behaves like a normal Python list via operator overloading. | |
""" | |
import copy |
This file contains 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
#Author: Jake Gaylor | |
#Date: June 27, 2012 | |
#@license: All rights reserved MSU SSRC | |
from math import radians, cos, sin, asin, sqrt, ceil | |
import geopy | |
from geopy.distance import VincentyDistance | |
This file contains 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
myQueue = [] | |
myString = "Tacocat" | |
myString.toLower() | |
for index,character in enumerate(myString): | |
myQueue.append(myString[index]) | |
myStack = myQueue.reverse() |
This file contains 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
#include <stack> | |
#include <queue> | |
#include <cstdlib> | |
using namespace std; | |
string toLower(string strr) | |
{ | |
char str[100]; | |
string ret; | |
strcpy(str,strr.c_str()); |
This file contains 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
#include <stack> | |
#include <queue> | |
#include <cstdlib> | |
using namespace std; | |
string toLower(string strr) | |
{ | |
char str[100]; | |
string ret; | |
strcpy(str,strr.c_str()); |
This file contains 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
#include <stack> | |
#include <queue> | |
#include <cstdlib> | |
#include <string> | |
using namespace std; | |
string toLower(string strr) | |
{ | |
char str[100]; |
This file contains 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
#include <stack> | |
#include <queue> | |
#include <cstdlib> | |
#include <string> | |
using namespace std; | |
string toLower(string strr) | |
{ | |
char str[100]; |
This file contains 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
#include <stack> | |
#include <queue> | |
#include <cstdlib> | |
#include <string> | |
using namespace std; | |
string toLower(string strr) | |
{ | |
char str[100]; |
OlderNewer