|
|
| Author |
Message |
| blurredman |
This post is not being displayed .
|
 blurredman World Chat Champion

Joined: 18 Sep 2010 Karma :   
|
 Posted: 14:55 - 24 Feb 2011 Post subject: Anyone know Programming? |
 |
|
Nothing was asked here,
This thread does not exist.
It is a glitch in the Matrix. ____________________ CBT: 12/06/10, Theory: 22/09/10, Module 1: 09/11/10, Module 2: 19/01/11
Past: 1991 Honda CG125BR-J, 1992 (1980) Honda XL125S, 1996 Kawasaki GPZ500S, 1979 MZ TS150.
Current: 1973 MZ ES250/2 - 18k, 1979 Suzuki TS185ER - 10k, 1981 Honda CX500B - 91k, 1987 MZ ETZ250 - 40k, 1989 MZ ETZ251 - 52k.
Last edited by blurredman on 00:00 - 26 Feb 2011; edited 5 times in total |
|
| Back to top |
|
You must be logged in to rate posts |
|
 |
| angryjonny |
This post is not being displayed .
|
 angryjonny World Chat Champion

Joined: 01 Sep 2006 Karma :    
|
|
| Back to top |
|
You must be logged in to rate posts |
|
 |
| Pete. |
This post is not being displayed .
|
 Pete. Super Spammer

Joined: 22 Aug 2006 Karma :     
|
 Posted: 15:46 - 24 Feb 2011 Post subject: |
 |
|
Can't help you with your problem, but I do see the irony of using Python to create a spam-blocking script
https://www.youtube.com/watch?v=anwy2MPT5RE ____________________ a.k.a 'Geri'
132.9mph off and walked away. Gear is good, gear is good, gear is very very good  |
|
| Back to top |
|
You must be logged in to rate posts |
|
 |
| ncrn |
This post is not being displayed .
|
 ncrn World Chat Champion

Joined: 24 May 2006 Karma :   
|
 Posted: 15:58 - 24 Feb 2011 Post subject: |
 |
|
It looks like you are opening your text file within the for loop. This means every time you run through the loop you create a new file.
Try this instead;
| Code: |
text_file = file('blacklistips.txt', 'wt')
for ip in [k for k,v in ips.iteritems() if v >= 13]:
text_file.write(v)
text_file.close()
|
Note the indentation, so that you close the file AFTER the for loop. Also I'm not seeing how v gets loaded with anything useful. ____________________ Past: 55 Sym Jet, 91 ZZR250, 03 NSR125R. Present: 97 ER-5.
https://www.nsr125.co.uk - NSR Owners forum. |
|
| Back to top |
|
You must be logged in to rate posts |
|
 |
| blurredman |
This post is not being displayed .
|
 blurredman World Chat Champion

Joined: 18 Sep 2010 Karma :   
|
 Posted: 16:05 - 24 Feb 2011 Post subject: |
 |
|
Nothing I tells ye! ____________________ CBT: 12/06/10, Theory: 22/09/10, Module 1: 09/11/10, Module 2: 19/01/11
Past: 1991 Honda CG125BR-J, 1992 (1980) Honda XL125S, 1996 Kawasaki GPZ500S, 1979 MZ TS150.
Current: 1973 MZ ES250/2 - 18k, 1979 Suzuki TS185ER - 10k, 1981 Honda CX500B - 91k, 1987 MZ ETZ250 - 40k, 1989 MZ ETZ251 - 52k. |
|
| Back to top |
|
You must be logged in to rate posts |
|
 |
| The999Kid |
This post is not being displayed .
|
 The999Kid World Chat Champion

Joined: 11 Jan 2008 Karma :  
|
|
| Back to top |
|
You must be logged in to rate posts |
|
 |
| yuri2085 |
This post is not being displayed .
|
 yuri2085 World Chat Champion
Joined: 05 Jul 2008 Karma :  
|
 Posted: 21:49 - 25 Feb 2011 Post subject: |
 |
|
The problem with that sketch is that the first two items listed don't contain any spam. |
|
| Back to top |
|
You must be logged in to rate posts |
|
 |
| blurredman |
This post is not being displayed .
|
 blurredman World Chat Champion

Joined: 18 Sep 2010 Karma :   
|
 Posted: 23:59 - 25 Feb 2011 Post subject: |
 |
|
hehehe  ____________________ CBT: 12/06/10, Theory: 22/09/10, Module 1: 09/11/10, Module 2: 19/01/11
Past: 1991 Honda CG125BR-J, 1992 (1980) Honda XL125S, 1996 Kawasaki GPZ500S, 1979 MZ TS150.
Current: 1973 MZ ES250/2 - 18k, 1979 Suzuki TS185ER - 10k, 1981 Honda CX500B - 91k, 1987 MZ ETZ250 - 40k, 1989 MZ ETZ251 - 52k. |
|
| Back to top |
|
You must be logged in to rate posts |
|
 |
| Im-a-Ridah |
This post is not being displayed .
|
 Im-a-Ridah World Chat Champion
Joined: 20 Oct 2006 Karma :   
|
 Posted: 09:16 - 26 Feb 2011 Post subject: |
 |
|
I only do J2SE, C and Matlab  |
|
| Back to top |
|
You must be logged in to rate posts |
|
 |
| Frost |
This post is not being displayed .
|
 Frost World Chat Champion

Joined: 26 May 2004 Karma :  
|
 Posted: 09:52 - 26 Feb 2011 Post subject: |
 |
|
I fucking hate Matlab. Every fucker uses it and it warps their perception od what is possible and how long it will take. They seem to think that because it's a single matlab command it's going to be equally easy to make run real time in C in a microcontroller or something. Worse still they'll call some complex function repeatedly to calculate something then when it runs like shit they say "Well it'll run more efficient in C". No It'll run more efficient if you actually code it properly!
I love Python as it's programming but without all the crap. C is nice for the mad speed  |
|
| Back to top |
|
You must be logged in to rate posts |
|
 |
| ncrn |
This post is not being displayed .
|
 ncrn World Chat Champion

Joined: 24 May 2006 Karma :   
|
 Posted: 11:04 - 26 Feb 2011 Post subject: |
 |
|
I think you need to pay for it, but you can use matlab to generate C code, which if you do some clever wrapping you can dump into a micro controller, and jobs done then. It won't be nearly as efficient as if you spent time considering it and coding it in C by hand, but its a lot quicker to prototype .
I found with python its programming but awkwardly, the biggest pain I find is with arrays, I wish they behaved like C arrays it'd be so much easier for me to comprehend . ____________________ Past: 55 Sym Jet, 91 ZZR250, 03 NSR125R. Present: 97 ER-5.
https://www.nsr125.co.uk - NSR Owners forum. |
|
| Back to top |
|
You must be logged in to rate posts |
|
 |
| Rogerborg |
This post is not being displayed .
|
 Rogerborg nimbA

Joined: 26 Oct 2010 Karma :    
|
|
| Back to top |
|
You must be logged in to rate posts |
|
 |
| panrider_uk |
This post is not being displayed .
|
 panrider_uk World Chat Champion

Joined: 23 Sep 2007 Karma :  
|
 Posted: 13:55 - 26 Feb 2011 Post subject: |
 |
|
When you have to worry about that you're behind the times - get a solid state disc drive
Mark ____________________ Current bikes: Honda ST1100 Pan European. Moto Guzzi V85 TT Travel |
|
| Back to top |
|
You must be logged in to rate posts |
|
 |
| Rogerborg |
This post is not being displayed .
|
 Rogerborg nimbA

Joined: 26 Oct 2010 Karma :    
|
|
| Back to top |
|
You must be logged in to rate posts |
|
 |
Old Thread Alert!
The last post was made 15 years, 199 days ago. Instead of replying here, would creating a new thread be more useful? |
 |
|
|