diff --git a/binaryS.py b/binaryS.py deleted file mode 100644 index 1703334..0000000 --- a/binaryS.py +++ /dev/null @@ -1,35 +0,0 @@ -def binaryS(f): - l = [1,2,4,5,6,7,8,9,10,11,12,13] - midpos = len(l)/2 - - found = False - first = l[0] - last = l[-1] - print last - print midpos - - if len(l)==0: - print False - - if l[midpos]==f: - print True - - while first<=last and not found: - if f>l[midpos]: - first = l[midpos]+1 - print first - found = True - print found - - - - - - -binaryS(1) -# from turtle import Turtle -# t=Turtle() -# for x in xrange(440): -# t.forward(5) -# t.left(10) -# # t.right(20) \ No newline at end of file diff --git a/fetchWeb.py b/fetchWeb.py deleted file mode 100644 index 779321f..0000000 --- a/fetchWeb.py +++ /dev/null @@ -1,29 +0,0 @@ -from bs4 import BeautifulSoup -import urllib -# r = urllib.urlopen('https://indianapolis.craigslist.org/search/apa?max_price=700&availabilityMode=0').read() -r = urllib.urlopen('https://indianapolis.craigslist.org/apa/5846927650.html').read() -soup = BeautifulSoup(r, "html.parser") -# print type(soup) -# print soup.prettify()[0:1000] -# letters = soup.find_all("li", class_="result-row") -letters = soup.find_all("section", id="postingbody") -# print soup -print letters - -lobbying = {} -for element in letters: - lobbying[element.a.get_text()] = {} - - -prefix = "indianapolis.craigslist.org" -# print prefix+letters[0].a["href"] -print letters -for element in letters: - lobbying[element.a.get_text()]["link"] = prefix + element.a["href"] - -for element in letters: - date = element.find(class_="result-date").get_text() - lobbying[element.a.get_text()]["date"] = date - -# for item in lobbying.keys(): - # print item + ": \n\t"+ "link: " +lobbying[item]["date"], lobbying[item]["link"] diff --git a/insert.py b/insert.py index d035d73..40c2835 100644 --- a/insert.py +++ b/insert.py @@ -32,4 +32,4 @@ def srt(lst): # print l srt(l) # swap(l, 15, 14) -print l #hiioco \ No newline at end of file +print l #hiilos \ No newline at end of file diff --git a/insert2.py b/insert2.py deleted file mode 100644 index 80e816b..0000000 --- a/insert2.py +++ /dev/null @@ -1 +0,0 @@ -def insert2(): \ No newline at end of file diff --git a/rec.py b/rec.py deleted file mode 100644 index 6f70070..0000000 --- a/rec.py +++ /dev/null @@ -1,16 +0,0 @@ -from random import randint - -def parse(): - s=[] - f = {(randint(0,9),randint(0,9)), - (randint(0,9),randint(0,9)), - (randint(0,9),randint(0,9)), - (randint(0,9),randint(0,9)), - } - for i, o in f: - s.append(i) - s.append(o) - return s - - -print parse() \ No newline at end of file diff --git a/scrapLinks.py b/scrapLinks.py new file mode 100644 index 0000000..1713257 --- /dev/null +++ b/scrapLinks.py @@ -0,0 +1,101 @@ +def scrapLinks(s): + count = 0 + while True: + startLink = s.find(" +
+ Meta Stack Overflow +
+ +
+ Meta Stack Overflow +
+ +
+ Meta Stack Overflow +
+ +
+ Meta Stack Overflow +
+ +
+ Meta Stack Overflow +
+ +
+ Meta Stack Overflow +
+ +
+ Meta Stack Overflow +
+