« first day (1416 days earlier)      last day (3527 days later) » 

1:00 PM
@IntrepidBrit Have you been here?
 
@PeterVaro Yep! Although, I feel bad. It was on a stag do; so I didn't do it the justice that it deserved. I definitely intend to return properly
The architecture was amazing, some of the wall frescos were amazing
 
let me know if you are coming -- I can show you some nice neighbourhoods here ;)
@IntrepidBrit yeah, well -- old city ;)
 
Do you guys like McDonald's over there? It was really weird to see McDonald's in (and maintaining) some magnificent buildings
If memory served me correctly, one was an old railway station
 
at the Nyugati, yes
 
@PeterVaro It's a pity having to step over the British "tourists" all the time
 
1:03 PM
sadly in the eastern european contries McDonald's is quite popular
 
I do look at some of the things that the British do abroad and have to hang my head in shame.
Our image to the outside world is just a bunch of loud, ignorant, drunken brutes.
 
@IntrepidBrit take a look at this -- it's quite up-to-date as I can tell:
 
@PeterVaro Quite possibly. I was aimlessly wandering around. Didn't have a clue where I was ;)
 
@IntrepidBrit one sec
 
@Ffisegydd It could be worse.... they could think of us as loud, ignorant, drunken and gullible brutes...
@PeterVaro That's awesome
 
YES
That's the one
 
well, I'm not a huge fan of the 'center' of the city.. (that's Pest) I'm living at a way nicer place (that's Buda) near the forest: google.com/maps/place/Budapest-Nyugati+Railway+Terminal/…
 
Looks nice :)
 
I wish someday we could arrange a huge SoPython part at Budapest
and ofc, I'm also very curios about all other countries and cities as well -- so it should be a roadshow or something
how far is it, when we will finally have proper VRs and this chatroom will became a 3D-reality..?
 
@PeterVaro You mean SecondLife?
 
1:23 PM
a way better one -- when a VR helmet will communicate directly through my brain-waves
more like in Matrix -- but without that freakin' needle :P
 
@PeterVaro Well, definitely DON'T come to Edinburgh until this whole Independence malarky is sorted. If there's a slew of public works being undertaken- going by Edinburgh Council's previous work. (Like the Parliament building and the Trams)
 
@IntrepidBrit grrr.. I just booked my tickets.. now I have to cancel it, thanks IntreBrit, thank you very much..
 
@PeterVaro Oops ;)
 
@PeterVaro (if you did have them booked, it would probably be fine if you traveled beforehand...)
 
1:28 PM
4
 
@PeterVaro is Budapest nice to visit?
 
@PaoloCasciello it is indeed!
 
@PeterVaro LOL that video :D
@PeterVaro nice to know. :) i always wanted to visit it but with some local insights on what to see, not the usual touristic things...
 
I don't like the typical museums, and places -- I like the hidden things if a city
one of my best trips where I found tons of interesting and weird places was to Paris
 
exactly :)
paris is beautiful! i love that city!
 
1:35 PM
me too! I don't like being there as a tourist (the french folks are so.. unfriendly to say the least) but it is a definitely nice place
(however I like french people in general => their films, designs, photographs, etc. are amazing)
 
well.. you have to be there with a french speaker... :D
 
@PaoloCasciello I went there when I learned french, so I did know a few phrases
 
Ah, good to know the Parisians are unfriendly to more people than us Brits ;)
 
@IntrepidBrit at least you are trying a bit, french people don't
"do you want anything? well learn french, because even if I can speak english fluently, I won't use it.."
 
1:38 PM
but if you speak french they are gentle.. :P
 
Nah, it's worse than that. You try speaking <insert European language here>, and they'll respond in English
 
Hi cbg all !!
 
(and i don't speak it :D )
 
So it makes it sodding difficult to pick up languages, I tell thee
@user3197452 Cabbage to you to
 
For code review ... how can I ask for a review of a biig project ?
@IntrepidBrit Thanks :)
thats hosted in github
 
1:39 PM
Most people charge for that sort of thing
 
?
@IntrepidBrit oh :) I mean an overview / opinion kinda ... not line by line review ? BTW where can I find paid services for the same ?
 
I'm sure if you float the possibility here, someone will pick up on the offer. (I don't want to volunteer anyone that I know of ;) )
If it's a quick question like - should I do a) or b), then feel free just to float the question to the room
 
Ok thanks ... :)
 
I would offer, but Python is far from my strongest language. It's one I want to get better at, but I couldn't justify charging people
 
@user3197452 aye you can ask in the room but obviously you'll be asking people to volunteer their time so you aren't guaranteed anyone will look at it
But I'll certainly take a quick look at it for you.
A brief glimpse at least.
 
1:48 PM
My attempt at learning Data structures in python - http://goo.gl/Pcz7s3

I though this might help me get a hang of data structures and algos ... But I learnt a lot of python instead :P :P
So my quick question is this ... I don't know if this is useful in anyway or not ( assuming that I am a student ... and I really wanted to learn a lot more about data structures ... Ok CLRS is one thing to do but I'd love doing something practical rather than sit and read for a long time :P )
So could anyone give me an overview of whether this is good / bad / any suggestions at all ?
@Ffisegydd Thanks :) a one line suggestion and a 2 min look would suffice :)
Under each chapter ... click on the rst to get a quick glimpse !
 
@user3197452 cool. I'll just note down things I notice as I read and then give them to you
 
@Ffisegydd Thanks a tonne :)
 
- Your function names are inconsistent (BinarySearch, selsort, etc). I'd suggest following PEP8 at http://legacy.python.org/dev/peps/pep-0008 .
- You've got some imports midway through the file, I'd suggest putting them all at the beginning of the file (PEP8 again IIRC).
- Some of your examples are very confusing to me as a Pythonista. This might be because you're using examples from a C++ book and so are following the C++ idioms. This is fine but it does make it bad Python.
- As you're using Python 2.x you should always have `class MyClass(object)`, not `class MyClass`.
(Was running out of message space, will continue now)
 
@Ffisegydd Thanks a lot for your time :) For point 3, if possible could you point to any one of those ... So I can correct it ?
 
- You use for i in range(n) a lot. Again I assume this is because you're using C++ algorithms but in Python it's usually better it iterate directly over your sequence
And yeah I'll find one now
You've created a base class and then are adding functions to it after the fact
I understand what it's doing but don't think I've ever seen this done before in Python
You may create a base class and then subclass it, but to write functions and then add them?
 
2:00 PM
Oh that ... I did that so that it could be split up based on the concepts as and when covered in the text book ... :)
 
- (This isn't to do with Python but...) is this book copyright material? Are you sure you're allowed to make use of the examples in this way? Would be a shame if you had done all this work and in the end you weren't.
 
and about the example that you gave ! I think I should correct it ... I did that a long time ago ... I was guided (wrongly) by the notion that private variables in python followed that norm ... :)
 
Yeah you can actually tell how you've improved with time :D based on what code you've done.
 
@Ffisegydd exactly :D I ended up learning a lot of python :D
 
I'd suggest trying to make it compatible for both Python 2 and Python 3. You'll get more potential users in this case.
 
2:04 PM
Okay :) and about copyrights ... Under the same project a lot more books exist ... :P So lets see if anyone gets caught :P
 
You don't need to del things usually. They will be caught by the garbage collector so don't worry about it.
 
@Ffisegydd I upvoted a few answers of yours for your really awesome feedback :) Thanks again !!
I guess i stopped doing that from chap 4 or so :D
 
That's very generous of you but you don't need to do that :)
I'd say my main point is: follow PEP8
 
Definitely ... Will follow that :)
 
You will find that your code will become more organised and people will be able to help you easier.
 
2:09 PM
Learned something cool today; the devs gave our 'favourite' troll a LGTB flag avatar for chat, on purpose.
 
@Martijn that is amazing.
 
which is effectively why we don't see that type of attack anymore even though nothing was done to prevent that type of account joining chatrooms.
 
Now that more and different set of people are here, I am repeating my question. Has anyone used a reliable face detection (not recognition) library with Python interface?
 
@MartijnPieters I tried that, but it is not very reliable
 
2:10 PM
right, that was my only idea.
 
@thefourtheye try simplecv !
 
It detected a face in the standard mountain image.
 
@thefourtheye was it Mount Rushmore?
 
@thefourtheye iPhoto finds the best non-human faces.
 
2:12 PM
No algorithm is 100% reliable.
 
@Ffisegydd Don't know the name, but this is the one
 
"Face recognition keeps on finding a face in the image, please halp!"
 
Hell, humans fail at this. They find faces in toast, for goodness sake.
@thefourtheye I totally see a face in there, don't you?
:-P
 
He he he, I am not as efficient as my computer... So, I don't see one :D
@user3197452 Thanks, I ll try that as well :)
 
2:14 PM
@user3197452 simplecv is only an abstraction on opencv
 
BAAAAH. Why are there so many words that share current?! Electricity, the sea, the present, a fruit. We need more words
 
@PaoloCasciello Yea :)
 
so if opencv don't work, neither do simplecv
for thefourheye tasks at least. :D
 
Yup, I think I should try to understand the haar cascade xml file.
 
2:19 PM
Yea that should help ! Ok Rhubarb all :) @Ffisegydd thanks again :)
 
Me too leaving now, TT training from tomorrow... Gotta catch some sleep. rbrb
 
morning friends. Angular.js is weeeird.
 
2:43 PM
Hi
CBG.
Does anyone know why this might not work in bash?:
echo 'import Cocoa;println("hi th\'ere")' | xcrun swift -i -v -
Gettting : /bin/sh: -c: line 0: unexpected EOF while looking for matching "'`
How should I properly be escaping that single quote?
 
2:57 PM
cbg
@IntrepidBrit isn't the fruit - currant?
 
cbg @Jon, good sleep?
 
@Ffisegydd yeah... think so... slowly coming awake I think
 
@JonClements Yep
 
What've I missed?
 
Hungarian desserts.
 
2:59 PM
Budapest
 
@MartijnPieters Yeah... I saw that metapost earlier... certainly an interesting approach
Is someone going to make barely awake puppy a nice up of tea, or do I have to do it myself as usual? :(
 
"You'll have had your tea then?"
 
@JonClements When they implement punching someone through the internet, I'll make sure it can also be used to get you a cup of tea.
 
@Martijn thanks for your consideration. In the mean time, I'll get off my arse and go make myself a cup I guess then :p
Oh no... it appears Kevin's suffered brain damage!
Wow... the answer on that got 3 downvotes fairly quickly
 
4 now.
 
user559633
3:07 PM
@Ffisegydd you're the filthy, unwanted clone >_<
 
ohaider @tristan :D
 
I was wondering when that was going to get noticed :P
 
@JonClements I showed Kevin the way by dupehammering that question.
 
@Martijn we probably should have done that sooner - the OP probably isn't going to elaborate and it's unlikely they wanted something using groupby... And that answer covers most realistic ways of doing the task... so, yeah...
Wow... took that guy six minutes to delete his answer
 
> EDIT: I mean iterate through a string in characters of groups of 2 or more
Together with is there a way that I can get more than one character in a for loop? I am interpreting this as a 'chunked loop' request.
 
user559633
3:15 PM
@DSM thanks for the support, even if it is transactional :P
 
@tristan I don't hate you any more than I hate anyone else here :)
 
what is the appropriate way to suggest a feature for an open-source project on github?
 
Raise an Issue and ask if they think it's a good idea? Then if they think yes you can issue a PR
 
user559633
@JonClements aww shucks kicks pebble
 
@corvid what project?
 
3:21 PM
I couldn't find email to @vaultah so i'm writing here. I've updated license and attribution. I hope you'll forgive my initial innocence :). I also want to thank BoltClock for calm explaining my mistakes. — xliiv 27 secs ago
 
cbg @Benjamin - good to see ya around again
 
cbg, how is everyone doing?
 
@vaultah all's well that ends well then.
cbg @Benjamin
 
Yea
 
@vaultah is that the one that took an answer of yours and published it as a github project or something?
 
Was just looking at the pypi entry
@vaultah well - they took it amicably, so all good
Did Bolt clear up comments or something... or am I just missing the post that started this all?
 
Wait, you don't see the deleted answer?
 
I can see it
 
Then I misunderstood you again D:
 
@vaultah I couldn't remember the post it was on - that's all
 
3:34 PM
cbg'
 
Ah, right
 
@MartijnPieters more work at relstorage that I thought before but only 20 % of tests failing anymore
 
@BenjaminGruenbaum the flask site. Just slightly annoying how the extension registry doesn't have any filters or sorting
 
@AnttiHaapala Still, progress!
 
@MartijnPieters I wish the code would decide whether to use strings or bytes... I think even in Python 2 it is not that clear what the data is supposed to be...
 
@AnttiHaapala Since bytestrings are strings.. it is just that some of them contain encoded text, right?
How does one jump to re.escape() to try and make import accept an invalid module name in the first place?
@AnttiHaapala The source to generate the text is entirely contained in the page.
 
@MartijnPieters for example, username is str in python 2, so it is handled as bytedata, base64 encoded for postgresql (the only db I have tested so far)... and ofc it means that unicode would not be accepted there, so I needed to decide what happens if python 3 meets this kind of data when reading from db, try to use utf8 first to decode, then latin1...
 
@AnttiHaapala Next thing to consider: will you support upgrading from Python 2 to 3 with an existing database.
The ZODB project had to make the same call..
 
@MartijnPieters thats why I said I thought what to do in this case, I haven't even thought of what will happen with pickles... yet...
probably not
someone can pay someone if they need it :d
 
@AnttiHaapala Pain. So much pain.
 
3:57 PM
I just want to use the relstorage, bc I do things in AWS
and I am more confy with rolling backups in postgres
than filesystems :D
maybe it could be easier to actually have zeo send the increments to S3 or something like that...
 
4:12 PM
@AnttiHaapala ZODB comes with an incremental backup tool.
It's called repozo.
 
as I said I am comfortable with PG :P
I can do incremental backups from there with PIITR, and
I know that even if zope storage would fsck up, the fact that it worked the other day means that I can get the data back :d
 
Not sure what this question is about; either extend the return value or edit the function. Duh.
 
hm, any ideas if there's a nice way to mock a class even if some other modules have already imported it? For newstyle classes i would simply monkeypatch __new__ but of course that fails for oldstyle classes..
 
@ThiefMaster just point a finger at them and go... "haha... you're so old"?
Umm.... slightly OTT: Thank you for contacting us! I have raised your credit limit to $500.00 at this time. You should only receive a single invoice per month with that limit.
Very trusting of linode :)
How many servers does he think we have with him for sopython!? :p
 
4:28 PM
How does this answer get 19 upvotes?
Sure ''.join(map(chr, integersequence)) works, but that's not an answer to the question how do I get a string from a bytes object in Python 3.
 
@Martijn I get caught earlier generating an inline img src
image = BytesIO()
plt.savefig(image, format='png')
return b64encode(image.getvalue()).decode('ascii')
Originaly didn't have the .decode so flask was rendering the output with the leading b' and trailing ' screwing it up - took me a few moments to realise why the image wasn't displaying
 
You are missing the data:image/png;base64, prefix, surely.
 
Although, thinking about it, do I really need the b64encode... can I not do something more direct
@Martijn nope, I had that...
I even had the comma after base64 :)
 
That was just a typo on my part, actually :-P
 
@Martijn that's originally what I thought I was doing wrong :)
the fact everything was starting with b&#39; was a bit of a giveaway in the end :)
 
4:38 PM
If i were to run python in a virtual environment does that rule out any possibility of someone hacking beyond the environment? If say there was a loop hole of some sort?
If I were to say create an online python repl... for example. People could enter in python code that could be run. Would it only be run against that virtual environment and not allowed access outside of it?
 
Just to check - are you talking about virtual environments as in the one you install modules to?
 
when I use virtualenv for example. Is that the one you are talking about?
 
I thought that be the one you were referring to... not it does not in the least
the python interpreter can still execute os.system etc... open files it has access to
You're effectively after a sandbox - not as easy as you'd think with Python :)
 
Yes I am after a sandbox. Any good pointers to head in the right direction?
Bummer. I mean that makes sense that you would be able to execute os system stuff.
 
@Johnston run it in a virtual machine with limited resources :)
and kill the VM after X amount of time :)
 
4:45 PM
I was just gonna say that. Yes.. Awesome. SO just keep spawning new vms
 
We looked into it when we had RABBIT about doing code evaluation... we originally uesd GAE test shell, but that was restricted to Python 2.5
I ended up talking to these guys: ideone.com/sphere-engine
Who have the technology - but I guess since you're trying to do this yourself, it's a bit of a wimp out using someone else to do it :)
It's very complex and if you get it wrong, say goodbye to your system
 
Wow. That is very usedful. I am scared of getting it wrong. Heard of docker? I think it solves the problem...
 
@JonClements PyPy has a sandboxing mode.
Other than that, use a virtual machine to run untrusted code.
Create a VM without network or peripherals, run the Python code in that VM, destroy the VM after a timeout.
That's basically what the sphere-engine does in any case.
 
It is impossible for code to exit a vm correct?
 
user559633
4:58 PM
yeah, docker isn't a terrible idea for it
 
user559633
@Johnston yes, non-trivial normally, but yes
 
user559633
if the virtualizing software has bugs or if you're sharing files from the OS with it, yes
 
Right
What about just reverting to snapshots? Would that work too or too dangerous?
 
@Johnston VMs make use of CPU features that completely isolate them from the host.
 
user559633
What does a snapshot have to do with this?
 
5:00 PM
I worked at a company that uses micro-vms to sandbox everything coming in.
Browsing the web? Each tab runs in a VM. Opening a document from an email? We'll VM your word processor then. ETc.
 
Holy crap that's insane.
 
user559633
If you think that someone has escalated out of a VM, you can't trust anything on the host
 
@tristan snapshots can be taken when a vm is created and then you can restore to the snapshot. Instead of destroying and recreating a vm
 
user559633
Yes, I know @Johnston, but see above.
 
5:03 PM
Aha gotcha.
@MartijnPieters I would think that would be a really really slow solution
 
@Johnston Performance on modern hardware was fantastic.
The CPU runs the VM at native speed, applying the isolation in hardware.
All you need then is the inter-process communication.
VMs were re-used for tabs on the same website.
so if you have Stack Overflow open in 3 tabs, they all share a VM.
The policy can be tweaked further to create whole groups of sites that all are allowed to be in the same VM.
They had some great demos with a Raspberry PI acting as an attacker, using an unpatched exploit in IE or Flash or Java to install a backdoor on the target machine.
Through the installed backdoor you could then poke about on the VM at will, until the tab is closed and the connection suddenly drops...
 
user559633
Awesome
 
@Martijn sounds like a complicated but absolutely fascinating project
 
IT sounds amazing
 
why does red bull make me sleepy?
 
5:18 PM
try with a real bull then...
 
@corvid are you confusing red bull and diazepam ?
 
nah, most of those make me feel more awake. Guess I fried my brain receptors from drinking 3 venti starbucks black coffees a day
 
this feels pointless
 
interesting
 
@MartijnPieters your comment about random brought back some memories. I wrote the Which? magazine prizedraw system in the early 00's and they disputed the system one year because of the 1500 prizes available (and 1.1 million entrants) a person won two different prizes - they argued that it was obviously flawed and couldn't be random (as it'd never happened before) :p
 
5:22 PM
I wanna downvote because "This answer is not useful"
As well as the question
And because the post uses Python 2 :P
 
@JonClements Someone hasn't understood what random means..
and underspecified the system.
The difference between improbable and impossible.
 
@Martijn funniest part is, they then got independent auditors in that we then had to sit down and explain how we'd written the system and explain why it was perfectly plausible with someone who'd subscribed to 5 magazines (so they'd have 30 entries) vs someone with one magazine (6 entries)
... to actually win more than one prize
They also weren't sure why it only took about 3 seconds to run instead of 2.5hrs like the previous computer bureau they used it took about 4 hours
 
user559633
I really hope the % style never goes away @vaultah
 
user559633
You get type coercion and it's really succinct.
 
It won't go away ;)
 
5:27 PM
I just got another call from the "windows technical department."
Was only able to keep them on the phone for 9 minutes this time. so bummed
 
@JonClements Were they using ERNIE 1 before or something?
 
@Johnston Microsoft have a "Technical Department" - I thought they just let the receptionists lose on the codebase now and then and see what happens
 
@JonClements This technical department. youtube.com/watch?v=J8p3_kqWSp4
 
@Johnston I managed to listen to a minute - had to give up
 
5:31 PM
Haha.
 
DSM
Cabbage, all.
 
@DSM cbg!
 
A Premium Bond is a Lottery Bond issued by the United Kingdom government's National Savings and Investments agency. The bonds are entered in a regular prize draw and the government promises to buy them back, on request, for their original price. The bonds were introduced by Harold Macmillan in his 1956 budget. The government pays interest on the bond (pegged at 1.3% in October 2013). But instead of the interest being paid into individual accounts, it is paid into a prize fund from which a monthly lottery distributes tax-free prizes, or premiums, to those bond-holders whose numbers are selected...
> ERNIE 3 was introduced in 1988 and was the size of a personal computer;[1] at the end of its life it took five and a half hours to complete its monthly draw.
So thinking drawing prices takes 4 hours wasn't that far off then..
 
12 years?
 
A man came and took my Whisky :(
 
5:43 PM
this room should have a command bot like the javascript room has
 
I also doubt ERNIE 3 had to process a 3gb file
 
@IntrepidBrit Jeremiah 2:20
or Isaiah 36:12
or 1 Samuel 25:22
You could have so much fun! :-P
 
what is this syntax implying? size = width, height = 900, 900
 
Nothing it's not proper python
 
5:50 PM
yes it might be... maybe... probably not...
 
Is it?!
I don't think it is
 
Yes it is
 
As there are two =
 
worked for me
 
width, height = 900, 900 unpacks to width, height
then size = is equal to the tuple of width, height
 
5:51 PM
size is a tuple, of width and height, which are unpacked from the tuple 900, 900
 
I thought you'd need a ;
 
and I'll guess that's come from a PIL/Pillow example somewhere :p
 
TIL THAT YOU CAN DO a = b = 2...
Or possibly I already knew this but had forgotten it.
My life...it is changed...
 
The other gotcha, and I've had people remove the comma in the past thinking it was wrong, is val, = some_function_that_returns_a_one_element_sequence_or_iterable()
 
Ah yeah I use that a lot in matplotlib
 
DSM
5:55 PM
That's used a lot in matplotlib. I don't like the look of it though.
 
As plt.plot returns a collection of line objects, so if you only have one line then it's a collection of 1.
 
@DSM It does look wrong though - I agree
 
I thought it had something to do with tuple unpacking because of the comma, but it just looks so wrong
 
@corvid think of it as: height, width = 900, 900; size = height, width
 
DSM
Now I support it being valid on syntactic consistency grounds, but that doesn't mean I have to like its use.
 
5:57 PM
@JonClements Left to right assignment, actually.
@JonClements No, size = 900, 900 and height, width = 900, 900.
with the 900, 900 part evaluated just once.
 
Pedant... I was trying to explain it in a way that made more sense logically, rather than semantically :)
 
An assignment statement evaluates the expression list (remember that this can be a single expression or a comma-separated list, the latter yielding a tuple) and assigns the single resulting object to each of the target lists, from left to right.
@JonClements I actually have an answer somewhere where that mattered greatly.
 
@Martijn when you don't have an answer somewhere for something - I'd be somewhat more surprised :p
@davidism @Ffisegydd What's the desired outcome for trello.com/c/9RuviBdU/… ?
(ie: should it just not 500, or should it extract the question from the answer link?)
 
I think it should extract the question from the answer link
 
6:01 PM
Should get the question from the answer. I think we should switch to Py-StackExchange so we dodn't have to write more one-off api calls.
 
@MartijnPieters Should I worry that you know all the 'ass' psalms off by heart? Are you Abstruse?
 
@IntrepidBrit It's only Google that makes me look like an anti-saint.
 
DSM
Since we tend to be a pretty pedantic room, I'll note for the record those aren't psalms..
 
Duly noted.
 
What are they? My bible days are lonnnnnnnnnng behind me
 
6:05 PM
@davidism I think the old site used that...
 
DSM
Simply verses (book; chapter; verse). Psalms are poems of praise, with a large collection of them known as the Book of Psalms. "Here endeth the lesson."
 
@IntrepidBrit Just google them?
 
Nope, didn't use it.
 
@DSM Thanks, @DSM. I am enlightened with more information
 
@davidism oh... the real time thingy did, not the site
 
6:07 PM
which real time thing, rabbit?
 
well, the deviation of rabbit
 
DSM
"the deviation of rabbit" sounds like a good title for something. Album, maybe.
 
That is actually quite funky... I'm (c)/(TM)'ing that now!
 
Or a really obscure Dirac mathematical equation ;)
 
I might make some spag bog tonight
Except it might end up being beef chilli on spaghetti as I haven't been shopping yet
Should really be approved: stackoverflow.com/questions/25610726/…
 
6:19 PM
 
Awww..... Unless I do have some rice... might have used it up for the paella the other day
Don't think I even have jacket potatoes I can use either sighs
@Ffisegydd please don't tell me you've found another favourite puppy? cries... I thought... I thought, you luberred me... meep meep
 
DSM
I'm not sure I buy this as a dup of the linked target, in that the accepted answer doesn't answer the question. Knowing whether a subseq is present is different from knowing where it is or removing it.
 
I am accepting user input and someone put in the black spade character (♠). I get UnicodeEncodeError: 'ascii' codec can't encode character u'\u2660' in position 122: ordinal not in range(128)
When I run data = urllib.urlencode(values)
 
6:35 PM
Can you even pass unicode to urlencode?
 
DSM
Just manually encode your strings to utf8 before passing them to urlencode.
 
One
Two
Three
More than three
more than three again
Psycho puppy's almost gone...
what comes after "more than three"?
 
DSM
Even more.
 
Excellent - mission accomplished - plus I learnt how to count!
 
One, two, many, LOTS
 
DSM
6:50 PM
Yesterday for the first time in a long time I had an SO-style question actually come up in a real program I was writing (turning a series of flat lists into a nested dictionary). Was pretty rare to use SO skills, and was a little embarrassing how many tries it took me to get it right..
 
7:02 PM
@IntrepidBrit No, it is one, two, many, many-one, many-two, two-many, two-many-one, two-many-two, LOTS, LOTS-one, LOTS-two, LOTS-many, etc.
I like the number LOTS-two-many, personally.
 
the most useful skill I learned in college was how to peel a pomegranate
 

« first day (1416 days earlier)      last day (3527 days later) »