So far, I've...
- downloaded a .iso file for Ubuntu. This was annoying because Chrome kept crashing at the end of the large download. I ended up having to switch to Firefox after two failed attempts.
- Copied the .iso file to an empty USB stick, tried to boot from it, didn't work. Boot menu gave two options UEFI and non-UEFI, neither worked -- all booted to Windows.
- Burned the .iso file to an empty DVD, tried to boot from it, didn't work. Tried both the "file system" option and the "CD/DVD" options when burning.
- Formatted the USB stick as directed here --> (Create a Bootable USB Stick), copied the .iso to it, and tried to boot from it. Still booted to windows.
---
5 minutes later:
After reading that article for a sec, here's what I'm doing next:
- checking the md5 sums for the .iso I downloaded -- DONE
- Continuing thru the BurningIsoHowto article and eventually booting Linux from the disk.
15 minutes and many googles later:
This article tells me I need a mounting program. None of the other articles mention this. Maybe they suck. OK, let's find a mounting program.
I've heard "daemon tools" twice, so, trying to get it. It's a bit sketchy. This thing is supposed to be free, but I keep finding myself in places where they're trying to get me to spend money.
NOW SOMETHING WANTS ME TO SAVE A .EXE. UMMMMMMM
OK, after looking at reviews on cnet, looks like Daemon Tools distros have been carrying various undesirables going back at least as far as last fall. So, let's look for another option.
---
Went back to using a DVD instead.
5 minutes later:
googled "burning an iso from command prompt", found this useful article, which gave me the command to use:
isoburn /q drive:\file.iso
Which, in my case, translates to:
isoburn /q C:\Users\David\Downloads\ubuntu-14.04.1-desktop-amd64.iso
(This appears to be the only way to access the Windows disc image utility that so many articles mention.) The burn appears to have been successful, since an Ubuntu install window popped up when I put the CD back in the drive after labeling it.
Restarting computer now. Fingers crossed: next OS I see should be Ubuntu, not Windows.
---
Crossing fingers worked and didn't work. Ubuntu came up, but it was very glitchy:
My computer was also making loud noises while this screen was up. So, I turned it off before it could get any further. (Was it frying my parts? I didn't wait around to find out. I'll consider letting it boot fully if I get the same result again.)
I'm going to try burning another DVD, this time with the "verify after burning" checkbox checked.
---
No luck. I got the same behavior as before. This time I toughed it out, but there was no reward, just this screen, which persisted for 5 minutes or so before I decided it wasn't going to change. After trying a few keys and getting no response, I turned off my computer again.
My best guess at this point is that this version of Ubuntu (14.04.1) doesn't support my video card, which is the AMD Radeon HD 6670. At this point, I've had about enough of Linux installation attempts for the day. Linux: 2, Me: 0.
---
Fortunately, the immediate point of the Linux install was to solve a Python issue, which I now see another way to solve. Earlier I was having problems downloading large files because Chrome was crashing at the end of each large download. Now I've switched over to Firefox for the time being. So, I'll try downloading a Python installation that comes with the desired libraries already installed.
First step, uninstall Python 2.7 via the Start menu. Done
Note: Might also try uninstalling my other Python versions if this doesn't work.
Next, download Python(x,y) from here. Just like I did before from Chrome, but this time I'm in Firefox, so the download won't crash at the end and waste 20 minutes of download time.
OK, downloaded it, starting the install. Oops, it's telling me that I still have Python 2.7 installed. Maybe I need to restart the computer for the registry changes to take effect. Let's try that.
After restart, same error message. Buh. OK, let's plow through it this time with the "install anyways" button. The only other option seems to be uninstalling my other Pythons (3.3, 3.4) and I'd rather not if I can help it.
Installation completed. Moment of truth. Run Grimm's script.
GREAT SUCCESS!
OK, now I just have to combine it with the adapted example script, and I'll be done. Wow.
Rough draft:
from xml.dom import minidom
import matplotlib.pyplot as plt
doc = minidom.parse("posts.xml")
# doc.getElementsByTagName returns NodeList
viewCounts = []
scores = []
rows = doc.getElementsByTagName("row")
for row in rows:
if (row.getAttribute("Id") == 1):
viewCounts.append(int(row.getAttribute("ViewCount")))
scores.append(int(row.getAttribute("Score")))
plt.plot(viewCounts,scores)
plt.title('StackExchange data -- ViewCount and Score')
plt.xlabel('ViewCount')
plt.ylabel('Score')
plt.show()
Result: not what was desired.
After some typecasting, still not getting results. Time to take a peek at what's going on under the hood with some print statements. Let's add a counter variable, increment it over every iteration of the for loop, and print the first 50 instances of the relevant variables.
OK, there was an issue with the attributes having null values. Fixed that by only appending the value if it was truthy (existing.) But, still the same graph result.
Eureka. Changed "Id" to "PostTypeId" after printing the arrays and finding they each had one value in them, as opposed to the expected thousands.
Achievement unlocked/mission complete/QED, which when pronounced phonetically rhymes with bed, which is what I will go to now.





No comments:
Post a Comment