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
from bs4 import BeautifulSoup | |
import urllib2 | |
import re | |
def get_sponsors(team_number): | |
url = re.findall('window.location = "(.*?)";', BeautifulSoup(urllib2.urlopen("http://frclinks.frclinks.com/t/{0}".format(str(team_number)))).find_all('script')[2].get_text().strip())[0] | |
return BeautifulSoup(urllib2.urlopen(url)).find_all("div", {"class":"team-name"})[0].get_text() | |
def get_sponsors_long(team_number): | |
url = "http://frclinks.frclinks.com/t/{0}".format(str(team_number)) |
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
from bs4 import BeautifulSoup | |
import mechanize | |
def get_sponsors(team_number): | |
br = mechanize.Browser() | |
br.open("http://frclinks.com/t/" + str(team_number)) | |
return BeautifulSoup(br.response().read()).find_all("div", {"class":"team-name"})[0].get_text() |
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
# | |
# Makefile - blinkasm.elf | |
# | |
# Author: Rick Kimball | |
# email: rick@kimballsoftware.com | |
# Version: 1.03 Initial version 10/21/2011 | |
APP=blinkasm | |
MCU=msp430g2553 |
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
# | |
# Makefile - blinkasm.elf | |
# | |
# Author: Rick Kimball | |
# email: rick@kimballsoftware.com | |
# Version: 1.03 Initial version 10/21/2011 | |
APP=blinkasm | |
MCU=msp430g2553 |
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 <msp430g2553.h> | |
extern void turnLEDOn(); | |
int main() { | |
WDTCTL = WDTPW | WDTHOLD; // Stop watchdog | |
turnLEDOn(); // Call our assembly code | |
return 0; | |
} |
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
interface Lockable { | |
int key = 0; | |
boolean locked = false; | |
void setKey(int key); | |
void lock(int key); | |
void unlock(int key); | |
boolean locked(); | |
} |
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
public abstract class Lockable { | |
int key = 0; | |
boolean locked = false; | |
void setKey(int key) { | |
this.key = key; | |
} | |
void lock(int key) { | |
if(key == this.key) locked = true; |
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
! Label the global | |
.global NthByte | |
! Symbol C file contains (label) | |
NthByte: | |
save %sp, -128, %sp | |
clr %l0 ! initialize accumulator | |
set %l0, 0xFF | |
loop: |
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
Exception in thread "AWT-EventQueue-0" java.lang.StackOverflowError | |
at java.util.ArrayList.ensureCapacityInternal(ArrayList.java:184) | |
at java.util.ArrayList.add(ArrayList.java:411) | |
at edu.wmich.cs1120.la2.TerrainScanner.findEdges(TerrainScanner.java:118) | |
at edu.wmich.cs1120.la2.TerrainScanner.findEdges(TerrainScanner.java:125) | |
at edu.wmich.cs1120.la2.TerrainScanner.findEdges(TerrainScanner.java:125) | |
at edu.wmich.cs1120.la2.TerrainScanner.findEdges(TerrainScanner.java:125) | |
at edu.wmich.cs1120.la2.TerrainScanner.findEdges(TerrainScanner.java:125) | |
at edu.wmich.cs1120.la2.TerrainScanner.findEdges(TerrainScanner.java:125) | |
at edu.wmich.cs1120.la2.TerrainScanner.findEdges(TerrainScanner.java:125) |
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
public char[][] findPath(int startRow, int startCol, int destRow, int destCol, int threshold) { | |
char[][] map = generateMap(threshold); | |
if(checkIfPassable(startRow, startCol, threshold)) { | |
if(startRow == destRow && startCol == destCol) { | |
map[destRow][destCol] = 'O'; | |
return map; | |
} | |
else { | |
ArrayList<int[]> pathzor = new ArrayList<int[]>(); | |
pathzor = findEdges(startRow, startCol, destRow, destCol, threshold, pathzor); |