« first day (2353 days earlier)      last day (2598 days later) » 

1:35 AM
oh poo, I already lost that 1 hour :(
 
@AndrasDeak since you're here -> stackoverflow.com/questions/43023962/…
worst Code Review suggestion I've seen so far
 
jeeeeze
 
ok he deleted it. I'll delete mine too
 
yup
good job;)
if anything, SO is the debugging site
I can't think of anything more on topic here than a well-formed debugging question
 
yep. Exactly. Well, at least it finished on a good note.
 
1:39 AM
yup
 
I had one recently where there was a discussion about how it should be moved when it really really should not have
 
:|
huge number of people are unaware of the "don't migrate crap" rule
no MCVE ( "it is not removing"; only function definitions) stackoverflow.com/questions/43023962/…
 
it's rbrb time for me
cheers
 
rbrb
me too
 
 
1 hour later…
3:11 AM
Took me a long time to decide on the best close reason for that kind of Q, but have settled on Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself, on the grounds that "But I didn't ask about any code" perfectly sets up a counter-retort.
 
 
2 hours later…
5:14 AM
Hello guys!
 
5:52 AM
It absolutely doesn't make a sense to have a tuple like that, though it makes a little more sense than a list like that. What you should have is to have each of the pairs in a tuple in a list. Why? Because tuple is a heterogeneous structure where the position of the elements matters; and list elements should be homogeneous; for example: "Name, Number" is a tuple; and "4 names" is a list. — Antti Haapala 8 secs ago
@SDurrani cbg
 
6:21 AM
cbg
any late night pythonistas on?
@AnttiHaapala Lists can be hetero, right?
 
@Code-Apprentice they can be.
 
k, just wanted to check. Not sure why you would do that, but hey
 
there is no law of physics that stops you from adding mustard, motor oil and yellowcake into a dessert.
 
I love me some motor oil!
probably doesn't mix very well with the mustard, though...
 
I've used heterogeneous lists too. but in a sense they're still homogeneous...
 
6:29 AM
in what way?
 
in that the type of a value in a position is in a union of types that might be in that list....
like, it is a List[Union[str, List]]
 
I can also see having several elements who's concrete type isn't necessarily the same, but by duck typing they can all be used in the same way.
 
well that's a different thing, they're essentially the same type there :D all ducks
 
exactly
 
I am talking about a case where not all are quacking
 
6:31 AM
one is mooing?
 
but when the guy says that the number should come "last in the list" my head explodes :D
 
I didn't read the question...just your quoted comment
 
AttributeError: 'int' object has no attribute 'quack'
 
I like my quacking ints
 
7:07 AM
This is awesome:
1
A: How to make a class attribute exclusive to the super class

jsbuenoThe mixin approach in other answers is nice, and probably better for most cases. But nevertheless, it spoils part of the fun - maybe obliging you to have separate planet-hierarchies - like having to live with two abstract classes each ancestor of "destroyable" and "non-destroyable". First approa...

 
7:37 AM
Are you guys up to some cleanup? This Q has pretty much every single answer posted 3-4 times. I think many answers should be deleted stackoverflow.com/questions/3996904/…
 
 
3 hours later…
10:28 AM
Off-topic - Any tips for keeping up work motivation? I seem to drift-off a lot lately. Mostly SO & Reddit.
 
SO is definitely my crack these days
for personal and consulting projects, I've started to use Pomodoro. Set a 25 min timer and focus on a task for the duration.
Then take a 5 min break
rinse and repeat
 
hmm, thanks. Need some policing. Weak human.
 
11:03 AM
Turn off the Internet.
Download what you need to get your work done (man pages, docs, etc.) and then use that for 8 hours.
 
 
2 hours later…
1:12 PM
cbg
 
1:41 PM
@AshishNitinPatil the problem is not with SO, Reddit.
 
I realize that. :/
 
@AshishNitinPatil the problem is with your work which is not as interesting as SO, Reddit.
 
cabbage!
I have trouble with opencv. I've installed it by "apt-get install python-opencv" but it is for Python2 version and i must use it in python3. How can I install it via apt package manager?
 
I am for some reason unable to request the full html code of this page: https://www.aliexpress.com/item/Dragon-Ball-Z-Mug-SON-Goku-Mug-Hot-Changing-Color-Cups-Heat-Reactive-Mugs-and-Cups/32649664569.html

My goal is to get the <img tags
This is what I have been trying: pastiebin.com/58d7c7d4823a3
My output is:
//u.alicdn.com/js/aplus_ae.js
//i.alicdn.com/ae-header/20170208145626/buyer/front/ae-header.js
These are src attributes from img tags, in the html.
I have no clue why it doesn't capture the full html code, and receives the images, instead of these javascripts
 
hey guys, is there anything like c#'s TakeUntil in python?
 
2:01 PM
@It'sNotALie. probably itertools.takewhile
Possibly with a negated condition, judging by the names
 
We have itertools.dropwhile as well.
 
cheers
 
risking to state the obvious: takewhile with a negated predicate will still take from the beginning of the iterable, while dropwhile will take from its end
 
2:34 PM
@SebastianNielsen you seem to have accidentally created a sock puppet account 2 months ago, using which you asked about your scraping problem on main. I've taken the liberty of arranging help for your account problem. Please don't do this next time.
 
 
6 hours later…
8:30 PM
I am getting ./zbarmodule.h:42:5: error: unknown type name 'PyIntObject'; did you mean 'PySetObject'? while installing zbar on OSX
Any idea on what else is needed to be installed?
 
newer python? :P I don't know, but that sounds weird
if development headers were missing I'd expect something different
 
there is zbar's development package for debian. Not sure how to install zbar on OSX. Probably I should start using Ubuntu again :|
 
8:52 PM
well if there's a zbar's development package and you ahve weird errors in headers, then yes, it's very possible that the two are related
 
There is no error in the headers. That's why I doubt it to be due to missing development package. But still, something is really weird and I do not know what it is
 
dunno, unfortunately I don't know OSX nor zbar:)
 
Even I am trying to use zbar for the first time. It is mainly for playing with barcode related stuff on images and videos.
zbarlight looks like a nice alternative to the zbar library. I will try to make this is run. Let's see
 
weird mistyping of zebra, by the way
 
I guess zbar is derived from zebra. Something like:
zebra + barcode > zbar
 
9:07 PM
oh, I didn't know what it was used for, that kinda ruins my pun
 
9:19 PM
if i want to make an app/game that uses a database to store information, how do I do that? I want to use a solution that's offline-friendly. Can I make a local database on the user's computer?
Can I have Python make a local database on the user's computer*
 
What kind of data are you planning to store in database? If data size is not huge, you can always store the structured data in a text file
Ahhhh, `zbarlight` is only for QR codes. I want to scan bar code :|
Again I should start rubbing my head figuring out the way to install zbar :/
@gloriousCatnip If you are not ok with writing the content on text file, you may use sqlite3 which is light weight database
 
i find file io to be very uncomfortable to work with, so i'd like to use a db solution :p
but will sqlite be able to create a new database on a new user's computer?
but maybe files will be easier
 
Since your game program will be running on users computer with permission allowed for the logged in user, you should be able to create database
 
yeh
but
what about a json solution?
would that work?
json/xml, that is
 
9:34 PM
Best way to figure that out is to try it. :) And yes it will work (including other solutions). Choose the one with which you are comfortable with. I don't think you would be needing a database
Note: if your data is going to be updated/accessed by concurrent processes, then using a database will be better choice as they maintain ACID property
 
i guess so, thanks tho! :D
 
 
2 hours later…
11:54 PM
A blast from the past:
0
A: Find the repeating substring a string is composed of, if it exists

Zero PiraeusThis is very similar, but not identical, to How can I tell if a string repeats itself in Python? – the difference being that that question only asks to determine whether a string is made up of identical repeating substrings, rather than what the repeating substring (if any) is. The accepted (and...

 

« first day (2353 days earlier)      last day (2598 days later) »