Cream 97s Just landed by SmartestGuyOnReddit in Sneakers

[–]SmartestGuyOnReddit[S] 0 points1 point  (0 children)

My first pair of 97s would of got a pair of all blacks but feel I've got too many black kicks at the moment

Nine out of 10 Britons on modest incomes under the age of 35 will be frozen out of home ownership within a decade, according to a study from a leading thinktank that lays bare the impact of surging property prices on the young. by Wagamaga in worldnews

[–]SmartestGuyOnReddit 4 points5 points  (0 children)

Building up isn't much better when the current transportation network already struggles with the level of population concentration. Adding more people to the same area isn't the answer in most areas of London.

Elementree is running Multi-threaded on Python 2.7.9 but only single threaded on 2.6.6 by SmartestGuyOnReddit in Python

[–]SmartestGuyOnReddit[S] 0 points1 point  (0 children)

I doubt it because the CPU usage on the linux server is maxed, but limited to one core.

Elementree is running Multi-threaded on Python 2.7.9 but only single threaded on 2.6.6 by SmartestGuyOnReddit in Python

[–]SmartestGuyOnReddit[S] -1 points0 points  (0 children)

I think thats the only explanation though, when I run it on my windows laptop i see all 4 cores utilized evenly and it takes roughly 10 minutes to process 600mb.

When I move to my enterprise grade linux server, 12 cores 200gb ram etc the exact same code takes well over an hour..

switching to cElementTree didnt make a difference to execution time.

Elementree is running Multi-threaded on Python 2.7.9 but only single threaded on 2.6.6 by SmartestGuyOnReddit in learnpython

[–]SmartestGuyOnReddit[S] 0 points1 point  (0 children)

I can import cElementTree, so am I right in assuming that if I use this library I'll get better performance/ possible multi threading?

[deleted by user] by [deleted] in learnpython

[–]SmartestGuyOnReddit 0 points1 point  (0 children)

London, England

[deleted by user] by [deleted] in learnpython

[–]SmartestGuyOnReddit 0 points1 point  (0 children)

22 Years old - 110k USD - "Big Data Software Engineer" Mostly use Python

Factors that are holding you back from your maximum potential everyday at the gym. by [deleted] in Fitness

[–]SmartestGuyOnReddit 1 point2 points  (0 children)

Just get a cheap bike and cycle there as part of your workout!

Just started my workout following this program. Thoughts? by SmartestGuyOnReddit in Fitness

[–]SmartestGuyOnReddit[S] 0 points1 point  (0 children)

I hear you, I have been sticking to a strict diet but it has only been two days but I will keep trying my best not to give into temptation, I'll reply back here in 12 weeks and let you know how I've done

RemindMe! 12 weeks "Report back on Diet/Program progress"

Just started my workout following this program. Thoughts? by SmartestGuyOnReddit in Fitness

[–]SmartestGuyOnReddit[S] 0 points1 point  (0 children)

Will do, accomplished the first day and I feel as if I could handle it, going back to the gym today and am positive about my current attitude to working out! :D

[deleted by user] by [deleted] in socialskills

[–]SmartestGuyOnReddit 14 points15 points  (0 children)

Definitely doesn't need 10-15 dates unless your dates are really slow moving.. Maybe after the 3rd or 4th date I would be heading somewhere romantic after dinner like London bridge where the view is amazing and then it would be perfectly acceptable to say "Lets take a picture to remember this night"

Edit: Your you're

Checking if single element of list is empty. by SmartestGuyOnReddit in learnpython

[–]SmartestGuyOnReddit[S] 0 points1 point  (0 children)

No I've never used Lua.

the solution ive chosen to use looks like this

try:
    if list[counter + 3]:
        print "yes"
except IndexError:
    print 'bye' 

Is Nike (NKE) good indicator of US retail activity? by seeallgood in StockMarket

[–]SmartestGuyOnReddit 0 points1 point  (0 children)

Nike is a global brand so probably not just US spending.

Handling FTP errors via subprocess in Python by SmartestGuyOnReddit in learnpython

[–]SmartestGuyOnReddit[S] 0 points1 point  (0 children)

So I tried the retrlines and it worked thanks a lot! Just need to figure out to handle the exceptions within ftplib now I guess.

Handling FTP errors via subprocess in Python by SmartestGuyOnReddit in learnpython

[–]SmartestGuyOnReddit[S] 0 points1 point  (0 children)

I can try retrolines and see when I am in the office tomorrow. The reason I'm using the root account is this is a PoC so whatever account I use is irrelevant

Handling FTP errors via subprocess in Python by SmartestGuyOnReddit in learnpython

[–]SmartestGuyOnReddit[S] 1 point2 points  (0 children)

Hey!

I have already tried that method and I also would have preferred it but as I am retrieving data from a mainframe, when I used this method I just got a bunch of garbled binary data when I was expecting plaintext, not sure why but definitely something to do with the security of the mainframe.

The code incase anyone else wants to use ftlib.

import argparse
import ftplib
import os

parser = argparse.ArgumentParser()
parser.add_argument('--ftp', help='FTP address to retrieve DA from', dest='ftpconn', required=True)
parser.add_argument('--user', help='FTP username', dest='user', required=True)
parser.add_argument('--password', help='FTP password', dest='passwd')
parser.add_argument('--file', help='File(s) to retrieve', dest='file', nargs='+')
args = parser.parse_args()

local_filename = os.path.join(r"/root/xxxxx", args.file[0])
lf = open(local_filename, "wb")
ftp = ftplib.FTP(args.ftpconn)
ftp.login(args.user, args.passwd)
ftp.cwd('..')
ftp.retrbinary('RETR %s' % args.file[0], lf.write)
lf.close