The Big Programming Thread - Page 752
Forum Index > General Forum |
Thread Rules 1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution. 2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20) 3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible. 4. Use [code] tags to format code blocks. | ||
njt7
Sweden769 Posts
| ||
Manit0u
Poland17185 Posts
On August 09 2016 19:15 bardtown wrote: I'll probably be here with a bunch of stupid questions over the coming days. Doing a simple voluntary project in Python and I am still, essentially, useless. I am trying to read data from a .csv file. The example code creates a csv.reader and then uses the following to iterate over rows: ... spamreader = csv.reader(csvfile, delimiter=' ', quotechar='|') How can I access rows directly? For example, I want to exclude the first row as it consists of column headers, not actual data. I also want to be able to access individual rows (row 44, for example). Do I need to use this loop to create some dictionary and index them myself, or is there a simpler way? spamreader.row[0] is apparently not a thing. Space as delimiter in a csv is lighting up a lot of alarm switches in my brain for some reason... | ||
Requizen
United States33802 Posts
| ||
phar
United States1080 Posts
On August 09 2016 22:18 Manit0u wrote: Space as delimiter in a csv is lighting up a lot of alarm switches in my brain for some reason... Doesn't really matter as long as you're consistent. All "c"sv files will have the same problems, doesn't matter what delimiter you use. It can be annoying, but not actually a problem. | ||
Aerisky
United States12128 Posts
How did the ransomware like start itself though? Can it attach itself to a movie and just run itself when you play the movie? Or is it just like masquerading as a movie file when it's really an executable? | ||
WhiteDog
France8650 Posts
On August 10 2016 02:24 Aerisky wrote: Damn the ransomware is extremely scary, I should definitely go make a backup, damn. I hear that ransomware instances have exploded recently since they're so easy to send out & they're so effective. How did the ransomware like start itself though? Can it attach itself to a movie and just run itself when you play the movie? Or is it just like masquerading as a movie file when it's really an executable? Apparently it's in Pirate Bay's advertising. https://www.grahamcluley.com/2016/04/pirate-bay-hit-malvertising-attack-drops-cerber-ransomware/ | ||
Nesserev
Belgium2760 Posts
| ||
bardtown
England2313 Posts
On August 09 2016 21:54 njt7 wrote: if you havent already figured it out http://stackoverflow.com/questions/522563/accessing-the-index-in-python-for-loops Ah, thank you. I managed to achieve what I wanted without this, but no doubt it will be useful in future. On August 09 2016 22:18 Manit0u wrote: Space as delimiter in a csv is lighting up a lot of alarm switches in my brain for some reason... Using commas in my own code. Not sure why they use space in the example. I'm making a dashboard, and my current plan is to use plotly to generate a bunch of HTML graphs, and then flask to structure/host them. I'm hoping this actually makes sense - as I haven't used plotly/flask - and that I can do it all without using javascript. | ||
Manit0u
Poland17185 Posts
![]() I usually try to use a delimiter that's not commonly used in normal text or numbers - it can really hurt you when you have to save some numbers that are formatted according to the locale, which might be like 0,5 instead of 0.5 in parts of Europe (or comma being used as thousands separator). CSV can be such a pain to work with sometimes that I'd rather just dump SQL or something ![]() | ||
Aerisky
United States12128 Posts
| ||
plated.rawr
Norway1675 Posts
![]() | ||
![]()
zatic
Zurich15310 Posts
| ||
Deleted User 101379
4849 Posts
On August 10 2016 19:28 zatic wrote: Rather do some serious backups, regularly. And make sure that the backups are read-only, so they can't be corrupted by a virus afterwards. | ||
![]()
tofucake
Hyrule18968 Posts
On August 10 2016 18:19 plated.rawr wrote: God, now you guys are making me nervous here. I've not used adblock the last year or so because I understand advertisements' function in supporting the sites I visit, but I'm thinking I'll be adding some serious blockage once I get back home. ![]() ads are also how most viruses spread these days. | ||
Mr. Wiggles
Canada5894 Posts
This is one of my favourites about compromising an HDD controller: http://spritesmods.com/?art=hddhack | ||
mantequilla
Turkey775 Posts
On August 10 2016 01:09 Requizen wrote: As a guy who has done mostly C#.NET and SQL, learning ExtJS is making my head hurt. it has a very steep learning curve at the start (took me a few months banging my head to wall) but once you get it it's so powerful and intuitive. I would trade it for angular and the likes if it wasn't so expensive (license) and had more job opportunities. it feels to me like, you pay the cost upfront with extjs (both money and productivity wise), instead of paying that in smaller amounts everyday with other free html+js+css frameworks. | ||
phar
United States1080 Posts
On August 10 2016 21:45 tofucake wrote: ads are also how most viruses spread these days. Citation needed. I'd be willing to hazard a guess that people not keeping stuff up to date and/or clicking on random shit is how more viruses spread. Maybe for someone pretty tech savvy operating with mostly other tech savvy people, maybe you'll only see or hear about people getting bit by drive by JavaScript attacks or what have you. But, have you ever watched someone who's fairly security illiterate use a computer? Shit is terrifying.... | ||
emperorchampion
Canada9496 Posts
On August 10 2016 22:46 Mr. Wiggles wrote: The fun part is that depending on how paranoid you are, you can't trust any of the infected hardware even after a disk wipe and reinstallation. It's interesting how many hardware components have writable firmware that can be exploited to keep the system compromised in a hard to detect way after the initial attack. This is one of my favourites about compromising an HDD controller: http://spritesmods.com/?art=hddhack Just have to burn the infected computer, or send it to hydraulic press channel. Also sometimes it's hard not to press random adds. Like I keep TL unblocked on my home laptop and I'm always clicking the stupid banner add at the top cause of my shitty trackpad has a tap-click =/ | ||
![]()
tofucake
Hyrule18968 Posts
On August 11 2016 00:50 phar wrote: Citation needed. I'd be willing to hazard a guess that people not keeping stuff up to date and/or clicking on random shit is how more viruses spread. Maybe for someone pretty tech savvy operating with mostly other tech savvy people, maybe you'll only see or hear about people getting bit by drive by JavaScript attacks or what have you. But, have you ever watched someone who's fairly security illiterate use a computer? Shit is terrifying.... nah that's how they are able to spread, but loads of malware is delivered by ads. | ||
Manit0u
Poland17185 Posts
| ||
| ||