• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 14:05
CET 20:05
KST 04:05
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
RSL Season 3 - RO16 Groups C & D Preview0RSL Season 3 - RO16 Groups A & B Preview2TL.net Map Contest #21: Winners12Intel X Team Liquid Seoul event: Showmatches and Meet the Pros10[ASL20] Finals Preview: Arrival13
Community News
[TLMC] Fall/Winter 2025 Ladder Map Rotation12Weekly Cups (Nov 3-9): Clem Conquers in Canada4SC: Evo Complete - Ranked Ladder OPEN ALPHA8StarCraft, SC2, HotS, WC3, Returning to Blizzcon!45$5,000+ WardiTV 2025 Championship7
StarCraft 2
General
Mech is the composition that needs teleportation t RotterdaM "Serral is the GOAT, and it's not close" RSL Season 3 - RO16 Groups C & D Preview [TLMC] Fall/Winter 2025 Ladder Map Rotation TL.net Map Contest #21: Winners
Tourneys
RSL Revival: Season 3 Sparkling Tuna Cup - Weekly Open Tournament Constellation Cup - Main Event - Stellar Fest Tenacious Turtle Tussle Master Swan Open (Global Bronze-Master 2)
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 499 Chilling Adaptation Mutation # 498 Wheel of Misfortune|Cradle of Death Mutation # 497 Battle Haredened Mutation # 496 Endless Infection
Brood War
General
FlaSh on: Biggest Problem With SnOw's Playstyle What happened to TvZ on Retro? SnOw's ASL S20 Finals Review BW General Discussion Brood War web app to calculate unit interactions
Tourneys
[Megathread] Daily Proleagues Small VOD Thread 2.0 [BSL21] RO32 Group D - Sunday 21:00 CET [BSL21] RO32 Group C - Saturday 21:00 CET
Strategy
PvZ map balance Current Meta Simple Questions, Simple Answers How to stay on top of macro?
Other Games
General Games
Path of Exile Stormgate/Frost Giant Megathread Nintendo Switch Thread Clair Obscur - Expedition 33 Beyond All Reason
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread SPIRED by.ASL Mafia {211640}
Community
General
Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread US Politics Mega-thread Artificial Intelligence Thread Canadian Politics Mega-thread
Fan Clubs
White-Ra Fan Club The herO Fan Club!
Media & Entertainment
Movie Discussion! [Manga] One Piece Anime Discussion Thread Korean Music Discussion Series you have seen recently...
Sports
2024 - 2026 Football Thread Formula 1 Discussion NBA General Discussion MLB/Baseball 2023 TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
SC2 Client Relocalization [Change SC2 Language] Linksys AE2500 USB WIFI keeps disconnecting Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List
Blogs
Dyadica Gospel – a Pulp No…
Hildegard
Coffee x Performance in Espo…
TrAiDoS
Saturation point
Uldridge
DnB/metal remix FFO Mick Go…
ImbaTosS
Reality "theory" prov…
perfectspheres
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1996 users

The Big Programming Thread - Page 752

Forum Index > General Forum
Post a Reply
Prev 1 750 751 752 753 754 1032 Next
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
Profile Joined August 2012
Sweden769 Posts
August 09 2016 12:54 GMT
#15021
if you havent already figured it out http://stackoverflow.com/questions/522563/accessing-the-index-in-python-for-loops
"All the casters who flamed me ever for anything."
Manit0u
Profile Blog Joined August 2004
Poland17433 Posts
August 09 2016 13:18 GMT
#15022
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='|')
... for row in spamreader:
... print ', '.join(row)


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...
Time is precious. Waste it wisely.
Requizen
Profile Blog Joined March 2011
United States33802 Posts
August 09 2016 16:09 GMT
#15023
As a guy who has done mostly C#.NET and SQL, learning ExtJS is making my head hurt.
It's your boy Guzma!
phar
Profile Joined August 2011
United States1080 Posts
August 09 2016 16:34 GMT
#15024
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.
Who after all is today speaking about the destruction of the Armenians?
Aerisky
Profile Blog Joined May 2012
United States12129 Posts
August 09 2016 17:24 GMT
#15025
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?
Jim while Johnny had had had had had had had; had had had had the better effect on the teacher.
WhiteDog
Profile Blog Joined November 2010
France8650 Posts
Last Edited: 2016-08-09 17:50:23
August 09 2016 17:48 GMT
#15026
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/
"every time WhiteDog overuses the word "seriously" in a comment I can make an observation on his fragile emotional state." MoltkeWarding
Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
Last Edited: 2016-08-09 17:55:07
August 09 2016 17:53 GMT
#15027
--- Nuked ---
bardtown
Profile Joined June 2011
England2313 Posts
August 09 2016 18:09 GMT
#15028
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:
Show nested quote +
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='|')
... for row in spamreader:
... print ', '.join(row)


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...


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
Profile Blog Joined August 2004
Poland17433 Posts
August 09 2016 23:59 GMT
#15029
I find comma almost as bad as space

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
Time is precious. Waste it wisely.
Aerisky
Profile Blog Joined May 2012
United States12129 Posts
August 10 2016 08:13 GMT
#15030
@WhiteDog and Nesserev: jesus fucking christ. I use ublock origin as well but I'm honestly not sure if it'll be enough. Fuck me, wow.
Jim while Johnny had had had had had had had; had had had had the better effect on the teacher.
plated.rawr
Profile Blog Joined June 2008
Norway1676 Posts
August 10 2016 09:19 GMT
#15031
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.

Savior broke my heart ;_; || twitch.tv/onnings
zatic
Profile Blog Joined September 2007
Zurich15355 Posts
August 10 2016 10:28 GMT
#15032
Rather do some serious backups, regularly.
ModeratorI know Teamliquid is known as a massive building
Deleted User 101379
Profile Blog Joined August 2010
4849 Posts
August 10 2016 10:38 GMT
#15033
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
Profile Blog Joined October 2009
Hyrule19152 Posts
August 10 2016 12:45 GMT
#15034
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.
Liquipediaasante sana squash banana
Mr. Wiggles
Profile Blog Joined August 2010
Canada5894 Posts
August 10 2016 13:46 GMT
#15035
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
you gotta dance
mantequilla
Profile Blog Joined June 2012
Turkey779 Posts
Last Edited: 2016-08-10 14:05:10
August 10 2016 14:01 GMT
#15036
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.
Age of Mythology forever!
phar
Profile Joined August 2011
United States1080 Posts
August 10 2016 15:50 GMT
#15037
On August 10 2016 21:45 tofucake wrote:
Show nested quote +
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.


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....
Who after all is today speaking about the destruction of the Armenians?
emperorchampion
Profile Blog Joined December 2008
Canada9496 Posts
Last Edited: 2016-08-10 16:02:58
August 10 2016 16:00 GMT
#15038
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 =/
TRUEESPORTS || your days as a respected member of team liquid are over
tofucake
Profile Blog Joined October 2009
Hyrule19152 Posts
August 10 2016 17:28 GMT
#15039
On August 11 2016 00:50 phar wrote:
Show nested quote +
On August 10 2016 21:45 tofucake wrote:
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.


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.
Liquipediaasante sana squash banana
Manit0u
Profile Blog Joined August 2004
Poland17433 Posts
Last Edited: 2016-08-10 18:12:05
August 10 2016 18:11 GMT
#15040
Is it just for Windows or is Linux also vulnerable? I guess it'd be much harder to pull of on Linux since you need to download the stuff, make it executable and then it needs proper permissions to do any real damage. Quite a few hurdles to overcome.
Time is precious. Waste it wisely.
Prev 1 750 751 752 753 754 1032 Next
Please log in or register to reply.
Live Events Refresh
OSC
19:00
Masters Cup #150: Group B
davetesta28
Liquipedia
IPSL
17:00
Ro16 Group D
ZZZero vs rasowy
Napoleon vs KameZerg
Liquipedia
PSISTORM Gaming Misc
15:55
FSL teamleague CNvsASH, ASHvRR
Freeedom44
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Railgan 177
IndyStarCraft 124
BRAT_OK 50
MindelVK 33
EmSc Tv 12
StarCraft: Brood War
Britney 20672
Calm 2244
Shuttle 809
Dewaltoss 128
Rock 52
Shine 40
NaDa 12
Dota 2
Gorgc5065
qojqva1662
Dendi976
League of Legends
rGuardiaN39
Counter-Strike
ScreaM1188
byalli487
Heroes of the Storm
Khaldor521
Other Games
tarik_tv5004
gofns2159
Beastyqt556
DeMusliM332
Grubby254
Lowko200
Fuzer 200
Organizations
Dota 2
PGL Dota 2 - Main Stream7478
Other Games
EGCTV796
gamesdonequick575
StarCraft 2
EmSc Tv 12
EmSc2Tv 12
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 19 non-featured ]
StarCraft 2
• printf 39
• IndyKCrew
• sooper7s
• AfreecaTV YouTube
• Migwel
• intothetv
• LaughNgamezSOOP
• Kozan
StarCraft: Brood War
• Airneanach44
• HerbMon 15
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• C_a_k_e 3173
• WagamamaTV394
• Ler87
League of Legends
• Nemesis3842
Other Games
• imaqtpie1387
• Shiphtur301
Upcoming Events
BSL 21
55m
Tarson vs Julia
Doodle vs OldBoy
eOnzErG vs WolFix
StRyKeR vs Aeternum
Sparkling Tuna Cup
14h 55m
RSL Revival
14h 55m
Reynor vs sOs
Maru vs Ryung
Kung Fu Cup
16h 55m
Cure vs herO
Reynor vs TBD
WardiTV Korean Royale
16h 55m
BSL 21
1d
JDConan vs Semih
Dragon vs Dienmax
Tech vs NewOcean
TerrOr vs Artosis
IPSL
1d
Dewalt vs WolFix
eOnzErG vs Bonyth
Replay Cast
1d 3h
Wardi Open
1d 16h
Monday Night Weeklies
1d 21h
[ Show More ]
WardiTV Korean Royale
2 days
BSL: GosuLeague
3 days
The PondCast
3 days
Replay Cast
4 days
RSL Revival
4 days
BSL: GosuLeague
5 days
RSL Revival
5 days
WardiTV Korean Royale
5 days
RSL Revival
6 days
WardiTV Korean Royale
6 days
IPSL
6 days
Julia vs Artosis
JDConan vs DragOn
Liquipedia Results

Completed

Proleague 2025-11-14
Stellar Fest: Constellation Cup
Eternal Conflict S1

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
SOOP Univ League 2025
YSL S2
BSL Season 21
CSCL: Masked Kings S3
SLON Tour Season 2
RSL Revival: Season 3
META Madness #9
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025

Upcoming

BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
HSC XXVIII
RSL Offline Finals
WardiTV 2025
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter 2026: Closed Qualifier
eXTREMESLAND 2025
ESL Impact League Season 8
SL Budapest Major 2025
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.