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
import string | |
REPLACE_SPACE = None | |
def map_alphabet(): | |
alphabet = string.lowercase | |
map = dict() | |
map[" "] = REPLACE_SPACE # if spaces are found in code | |
for idx in range(0, 26): | |
map[alphabet[idx]] = idx |
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
from Tkinter import * | |
from math import * | |
from time import sleep | |
import webbrowser | |
class Calculator(): | |
def __init__(self): | |
self.root = Tk() | |
self.root.wm_title("Montana's Calculator") |
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
import java.util.Scanner; | |
public class SortingAlgorithms { | |
public static void main(String[] args) { | |
int[] anArray = {2, 3, 1, 5, 6, 33, 10, 15, 16, 4, 7, 1000}; | |
int searchTerm; | |
System.out.println("Starting array"); | |
for (int x = 0; x < anArray.length; x ++) | |
System.out.printf("%d ", anArray[x]); |
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
import requests, webbrowser | |
def get_frontpage_info(): | |
url = "http://www.reddit.com/.json" | |
r = requests.get(url) | |
json_data = r.json() | |
try: |
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
import requests, webbrowser | |
def get_reddit_user_info(username): | |
url = "https://www.reddit.com/user/%s.json" % username | |
r = requests.get(url) | |
json_data = r.json() | |
#op = json_data['data']['children'][0]['data']['link_author'] | |
#individualpost = json_data['data']['children'][0]['data'] |
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/env python2.7 | |
# Author:**** | |
# Education: **** | |
# Email: **** | |
# Phone: 808-633-**** | |
# Purpose: ZapposGiftProgram.py is my submission for Zappos' 2015 Summer | |
# Software Engineering Internship application. The program prompts the user for two | |
# inputs: the amount of money they want to spend, and how many gifts they want to purchase. | |
# The program searches through Zappos's website using its API and returns a series of |
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
from random import randint | |
import datetime | |
score = 100 | |
round = 1 | |
#date and time included in high scores | |
now = datetime.datetime.now() | |
today = datetime.date.today() | |
numericalDate = "%d/%d/%d" % (today.day, today.month, today.year) |
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
import os, glob | |
path = "/Users/mowong/Documents/Thumbnails/Big_Thumbnail_Project" # update to current dir | |
list = ["1","3","4"] #append here the version number(s) | |
for x in list: | |
for files in glob.glob("/Users/mowong/Documents/Thumbnails/Big_Thumbnail_Project/*-0%s.jpg" % x): | |
os.remove(files) | |
NewerOlder