• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 04:36
CET 10:36
KST 18:36
  • 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
TL.net Map Contest #21: Winners11Intel X Team Liquid Seoul event: Showmatches and Meet the Pros10[ASL20] Finals Preview: Arrival13TL.net Map Contest #21: Voting12[ASL20] Ro4 Preview: Descent11
Community News
[TLMC] Fall/Winter 2025 Ladder Map Rotation4Weekly 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
[TLMC] Fall/Winter 2025 Ladder Map Rotation Mech is the composition that needs teleportation t Weekly Cups (Nov 3-9): Clem Conquers in Canada Craziest Micro Moments Of All Time? SC: Evo Complete - Ranked Ladder OPEN ALPHA
Tourneys
Constellation Cup - Main Event - Stellar Fest Tenacious Turtle Tussle Sparkling Tuna Cup - Weekly Open Tournament $5,000+ WardiTV 2025 Championship Merivale 8 Open - LAN - Stellar Fest
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
Rapidtags: The Ultimate Tool for Hashtag and Keywo Terran 1:35 12 Gas Optimization FlaSh on: Biggest Problem With SnOw's Playstyle BW General Discussion BGH Auto Balance -> http://bghmmr.eu/
Tourneys
[BSL21] RO32 Group D - Sunday 21:00 CET [BSL21] RO32 Group C - Saturday 21:00 CET [ASL20] Grand Finals [Megathread] Daily Proleagues
Strategy
Current Meta PvZ map balance How to stay on top of macro? Soma's 9 hatch build from ASL Game 2
Other Games
General Games
Nintendo Switch Thread Stormgate/Frost Giant Megathread Should offensive tower rushing be viable in RTS games? Path of Exile Dawn of War IV
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
US Politics Mega-thread Russo-Ukrainian War Thread Things Aren’t Peaceful in Palestine Canadian Politics Mega-thread The Games Industry And ATVI
Fan Clubs
White-Ra Fan Club The herO Fan Club!
Media & Entertainment
[Manga] One Piece Anime Discussion Thread Movie Discussion! 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: 1225 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
Poland17428 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
Poland17428 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
Hyrule19151 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
Hyrule19151 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
Poland17428 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
Replay Cast
09:00
WardiTV Mondays #59
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
SortOf 286
StarCraft: Brood War
Britney 49000
Rain 2987
Hyuk 2893
Soma 360
Backho 327
Rush 213
Pusan 117
JulyZerg 53
sSak 31
zelot 14
[ Show more ]
NaDa 12
Noble 11
ZerO 10
Hm[arnc] 8
Terrorterran 7
Dota 2
XaKoH 419
XcaliburYe139
Counter-Strike
fl0m1798
olofmeister680
shoxiejesuss411
oskar63
Super Smash Bros
Mew2King237
Other Games
ceh9502
Happy244
Pyrionflax116
ZerO(Twitch)4
Organizations
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 14 non-featured ]
StarCraft 2
• Berry_CruncH257
• LUISG 21
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Rush1347
• Stunt515
Upcoming Events
OSC
1h 54m
Kung Fu Cup
2h 24m
Classic vs Solar
herO vs Cure
Reynor vs GuMiho
ByuN vs ShoWTimE
Tenacious Turtle Tussle
13h 24m
The PondCast
1d
RSL Revival
1d
Solar vs Zoun
MaxPax vs Bunny
Kung Fu Cup
1d 2h
WardiTV Korean Royale
1d 2h
PiGosaur Monday
1d 15h
RSL Revival
2 days
Classic vs Creator
Cure vs TriGGeR
Kung Fu Cup
2 days
[ Show More ]
CranKy Ducklings
3 days
RSL Revival
3 days
herO vs Gerald
ByuN vs SHIN
Kung Fu Cup
3 days
IPSL
3 days
ZZZero vs rasowy
Napoleon vs KameZerg
BSL 21
3 days
Tarson vs Julia
Doodle vs OldBoy
eOnzErG vs WolFix
StRyKeR vs Aeternum
Sparkling Tuna Cup
4 days
RSL Revival
4 days
Reynor vs sOs
Maru vs Ryung
Kung Fu Cup
4 days
WardiTV Korean Royale
4 days
BSL 21
4 days
JDConan vs Semih
Dragon vs Dienmax
Tech vs NewOcean
TerrOr vs Artosis
IPSL
4 days
Dewalt vs WolFix
eOnzErG vs Bonyth
Wardi Open
5 days
Monday Night Weeklies
5 days
WardiTV Korean Royale
6 days
Liquipedia Results

Completed

Proleague 2025-11-07
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
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
BLAST Open Fall Qual

Upcoming

SLON Tour Season 2
BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
HSC XXVIII
RSL Offline Finals
WardiTV 2025
RSL Revival: Season 3
META Madness #9
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.