« first day (2347 days earlier)      last day (2609 days later) » 

12:22 AM
cbg what you guys think about divisional vs functional file structure?
 
 
2 hours later…
1:55 AM
sunday evening cabbage
 
 
3 hours later…
4:28 AM
Guys anybody knows a way to do geo coding for free?
since google api has 2500 daily limit..
can we do it by storing them in geo json files locally and search them to geocode?
if so from where can I download such files?
 
5:19 AM
@MarlonAbeykoon Check out Django's gis modules
 
im using web.py framwork
 
You can still import only the gis modules I assume
 
I was reading the highest voted answer here too.. stackoverflow.com/questions/6159074/…
I'll check your one as well
thnks
 
5:51 AM
stackoverflow.com/questions/42896509/… (from review / OP is an imbecile)
 
6:03 AM
@ZeroPiraeus Does an edit salvage this time? Or do we expect more from the OP (from exp.?)?
He did say it was a pun, so I suppose we can give him a chance.
 
If OP edits actual text into the question, maybe it will be on topic. How on Earth that's a pun I've no idea.
 
Cabbage
 
@ZeroPiraeus In either case, removing the line does good to all right? (Even if question gets closed, others don't see it & get triggered, if at all)
 
Is "pun" understood to mean "joke" in some regional variation of English?
 
6:06 AM
That's some dumb save by OP
 
@AshishNitinPatil If you want to edit it out, I don't see the harm.
 
C: I understand this IS Bolton.
O: (still with the fake mustache) Yes?
C: You told me it was Ipswitch!
O: ...It was a pun.
C: (pause) A PUN?!?
O: No, no...not a pun...What's that thing that spells the same backwards as forwards?
C: (Long pause) A palindrome...?
O: Yeah, that's it!
C: It's not a palindrome! The palindrome of "Bolton" would be "Notlob"!! It don't work!!
 
It's probably best if we only do cv-pls for Python questions in here. SOCVR accept general cv-pls requests, but they prefer to concentrate on priority questions (i.e., stuff in the official queues, and bad questions that are attracting bad answers). Also, they like cv-pls requests to conform to the SOCVR FAQ.
 
Fair enough. I generally don't cv-pls unless it's Python, and even then only when I think it's pretty obvious. This one just annoyed the hell out of me.
But yes, I will keep my rage bottled up inside in future, or divert it into shouting at the furniture :-)
 
6:23 AM
@idjaw ... yes
one thing that I miss in intellij is that it doesn't support interfaces yet :P
 
Definitely-not-cv-pls-because-its-already-closed-but-this-is-just-hilarious-so-i‌​-had-to-share:
-2
Q: Creating a custom GUI for Windows?

sandysquidAAMoFI would like to replace the Windows Desktop with a GUI. How would you go about doing this? I would like to target Windows 10.

 
@ZeroPiraeus Understood. It's a horrible question, and that baseless accusation of racism made it even more horrible.
 
6:43 AM
I don't know SQL, but this is a classic SQL injection vulnerability, isn't it? stackoverflow.com/questions/42897236/…
 
You know linguistics but you don't know SQL?
 
OTOH, I suppose the data is coming from the server, not arbitrary user data.
 
It doesn't make sense to format it manually
 
@khajvah That's because I'm an enthusiastic amateur, not a professional, so I've never had a need to do database stuff.
 
oh, what's your profession?
 
6:47 AM
@khajvah I don't really have one. :) But last time I had a real job I worked for a marketing services company. For the last 6 years I've been living with my elderly parents, doing housework and helping to care for the garden (it's a fairly large house & property).
 
@PM2Ring oh that sounds fun. I usually hate my profession when doing it professionally
I switched to a new a company a month ago adn I already want to quit
 
Programming is like sex. It's not as much fun when money is involved.
14
 
:D
although I wouldn't be able to tackle the problems myself I do in here
because I can't have that much traffic :D
 
@PM2Ring Also, if you find yourself screaming "work, damn you!" at your equipment, it's time to take a break.
 
what is called when you want to find words that have some set of letters in relative order but can be anywhere in the word?
 
7:03 AM
@ZeroPiraeus I guess that applies to sex as well as programming. ;)
@AlexBollbach Anagram?
 
no because you have to preserve the ordering
so pton -> python
so does yhn -> python
 
That's a subsequence.
 
i'm trying to come up with pneumatics for remembering something and might have to write an algorithm to do it
 
@AlexBollbach "mnemonics", not "pneumatics"
 
I was actually thinking you might be talking about words like "ghost", which are in alphabetical order.
 
7:05 AM
lol
i meant i needed to pump myself with air
just replace alphabet with my set and same idea
only they can contain extra letters along the way
 
@AlexBollbach Ah, right. So as Zero said, you're looking for subsequences.
 
I once came up with a T-shirt design that was just ABCDEF IJKLMN PQR UVWXYZ, but the crowdsource-design-site I sent it to wasn't interested.
Philistines, the lot of them.
 
ghost?
 
@AlexBollbach Do you want a function that tests if one string is a subsequence of another string?
 
Yup.
 
7:11 AM
no that won't cut it
subsequence you say?
so ptn is a subsequence of python?
 
@AlexBollbach Ok, It's not clear what you're actually looking for. Do you want to generate subsequences of a given string, with those subsequences obeying some additional constraint (apart from preserving order)?
@AlexBollbach Correct.
 
its clear
aldr -> alexander
words that contain the input set in its original ordering
say i want to memorize HMAC
if i can find a word that has h-m-a-c in sequential order I can use that word as a mnemonic
 
@AlexBollbach OK! Now I understand what you're asking for. :)
You could implement that with a function that tests if one string is a subsequence of another string. Of course, you'll also need a suitable word list, eg the Sowpods wordlist from 3zsoftware.com/download
 
@AlexBollbach let me find :P
 
it would also be nice to ignore words that don't begin with the first letter of the input set
 
7:23 AM
grep '^h.*m.*a.*c' /home/ztane/docs/sowpods.txt
hackmatack
you'd want the shortest levenshtein distance
 
also it would be further optimal to have the subsequent letters in the input set correspond to letters in the front of consonants and vowels
 
well, I will give you a start
word> hmac
hematic
haematic
hematics
humpback
haematics
hematinic
hematitic
hematuric
hemispace
homeplace
import re
import Levenshtein

with open('sowpods.txt') as f:
    words = [ w.strip().lower() for w in f ]


initials = input('word> ')
pattern = re.compile('.*'.join([re.escape(c) for c in initials.strip().lower()]))

candidates = [w for w in words if pattern.match(w)]
sorted_candidates = sorted(candidates, key=lambda w: Levenshtein.distance(w, initials))
print(*sorted_candidates[:10], sep='\n')
 
StefanPochmann has a lovely (non-regex) is_subseq test here
def is_subseq(x, y):
    it = iter(y)
    return all(c in it for c in x)
 
Levenshtein is from pytthon-Levenshtein
@PM2Ring pfft.
that is much slower than a regex
I do not understand why everything needs to get written in python.
hmmh
 
It is pretty though.
 
7:33 AM
but now people will spend the time to find a python solution to every regex, and that ain't pretty.
hmm can you find a trickier acronym for me :D
actually perhaps just len would do
 
@AnttiHaapala I can believe it; after all, regex is designed to do that sort of search efficiently. Still, in general, if a non-regex solution is clear, I think it's a good idea to at least compare the performance of the regex vs the non-regex solution, just in case the pure string-based algorithm is faster.
 
7:53 AM
Cabbage
 
8:27 AM
@AnttiHaapala I think you're wrong …
$ time python3 shootout.py 100000 iterated
    ...
real	0m0.818s
user	0m0.781s
sys	0m0.030s
$ time python3 shootout.py 100000 regular
    ...
real	0m16.917s
user	0m16.800s
sys	0m0.022s
waits for really obvious mistake to be pointed out
(oh, btw the sorting on len for the corpus was because I started out thinking I'd go exhaustive, but that turned out to be a silly idea)
 
@ZeroPiraeus so, you're explicitly compiling the pattern for each search...
if you just used re.search string, it would at least have been cached
but yeah
perhaps backtracking
it should perhaps use ? too
 
Switching to a string for the pattern saves about a second.
Use ? how?
nongreedy?
 
@AnttiHaapala But he's only doing 1 search with each needle, so why does that matter?
 
hmm doesn't help yet
ahha :d
@PM2Ring of course it doesn't matter here.
anyway a bad test
 
Gotta be backtracking I think, yeah (though I'm no expert on when that kicks in, frankly).
 
8:38 AM
no
@ZeroPiraeus it is because you're not reusing the regex
that is exactly what I am not doing, I am looking for the best word in sowpods
must be
needle = random.choice(words)
for n in range(int(sys.argv[1])):
    haystack = random.choice(words)
    if search(needle, haystack):
        print(needle, haystack)
 
Yeah, for Alexander's application you need to test needle against the whole of words.
 
Hm, yeah, ok … about the same time now.
(and overhead will be masking most of the difference now, I think)
 
but the sequence one is still slightly faster
lol
@ZeroPiraeus you know what cut the most:
 
Go on …
 
switch from re.search(pattern, haystack) to pattern.search(haystack)
 
8:43 AM
Hahaha
 
meaning.... that actually cut almost 50 % of the running time and now regex is faster
 
Nice!
I concede :-)
 
(btw, precompiled pattern was what I was using in my code above anyway)
 
I've been looking for a part of the Google site for a few days, but I can not find it. Can you give me an HTTP link to which parts of Google I should contact? I am most concerned about the privacy terms of users. developers.google.com/maps/terms (9.3.c.i.A section) — juilcho 54 mins ago
Honestly, some people …
 
9:09 AM
Does anyone know how to put a license code on a script. So that you will have to provide the costumer with a activation key, to be able to activate the code?
 
9:27 AM
@SebastianNielsen is that even possible?
 
Why should it not be possible?
I found this so far, I am not sure how well it works. Still researching it.
http://desktop.arcgis.com/en/arcmap/10.3/analyze/python/access-to-licensing-and-extensions.htm
 
9:42 AM
@SebastianNielsen It's not really possible with plain Python code. But you could put some essential functions of your script in a C library, and have license protection on that library.
 
would it be possible to convert my python script with cython, and then add the license code?
Convert the whole script.
 
I suppose so, but I don't know Cython. And it's not just a matter of appending license stuff to the compiled script. To properly protect the code it needs to be encrypted. The protection component has to decrypt the main code in such a way that a determined attacker can't easily intercept it and bypass the protection. This is a rather advanced topic. I'm aware of the general principles, but I certainly don't know the details of current best practice.
 
Cabbage!
 
@SebastianNielsen But why are you asking about this stuff? Your Python skills are not yet at a level where you can write software requiring such protection.
 
Well, it's not that important to make it fully protected.
My goal is to sell my code to a lot of people who doesnt have a lot of knowledge in the IT field. And just to make sure they don't resell it, I just want an activation code on it
They are @PM2Ring
My code is advance, but people are interested in buying it.
 
9:51 AM
[citation needed]
 
Sorry, what?
Do you want me to quote someone ?
 
From the examples I've seen here, your Python coding skills are still very basic.
 
Yeah, but the point is. They work.
 
@SebastianNielsen If it doesnt have to be secure then just use something like py2exe
 
And if people are willing to buy.
 
9:53 AM
Just tell them you'll sue them if they use it outside of the licence, and don't worry about keys
 
If my code costs 1,5 euro "I'll sue you if you use it outside of the license"
It's like pirating games, everyone knows that nothing is going to happen.
They won't give a shit.
I simply just want to make sure that the people I sell the code to, can't give it or resell it to other people.
 
@poke there?
 
yep
 
@poke this is a dupe of this?
 
Kind of but there should be a better explanation for this.. let me search
just doing daily at work now, so will be back in a moment
 
10:02 AM
Sure, whenever you're free. Thanks!
 
10:20 AM
Interesting. rhettinger just posted an answer that uses functools.cmp_to_key stackoverflow.com/a/42900060/4014959
 
10:48 AM
That facepalm moment when one noob upvotes / accepts other noob's almost-wrong / non-standard answer, just because it is easier than the right / standard answer.
 
11:18 AM
Also reject suggested edit
 
11:35 AM
Brendan Behan was supposedly once commissioned to write a slogan for Guinness, and after several months of apparent inactivity (except for drinking crate after crate that they sent him for free), eventually, after some pressure from the client, came up with "Guinness makes you drunk".
Then again, the slogan for the most popular beer in Bolivia is "it's beer", so maybe he was onto something.
 
11:59 AM
cbg
 
12:21 PM
@SebastianNielsen might be worth hiring a developer to turn that "simply" into something complicated but works :)
 
12:33 PM
@Sword nice palindrome, it would be bad if something were to...*happen to it*
@BhargavRao and a subtle one :D
cbg
 
cbg!
 
cbg
 
@ZeroPiraeus You know, I have never once inserted 'o' as my first choice into the contraction sht
code_scrsh*t indeed
 
12:45 PM
How's this for a list incomprehension? From stackoverflow.com/a/42903267/4014959
newdata = [list(g)[0] for k, g in groupby(sorted(((int(row[0]), int(row[1]), row[2], row[3]) for row in (row.split() for row in src.splitlines())), key=lambda t: (t[2], t[3], -t[1], t[0])), key=lambda t: t[2:])]
 
eh
that's lisp
groupby(sorted(((int(row[0]) ...
 
I did post a readable version as well. But I couldn't resist posting that one. :)
 
how about next(g) instead of list(g)[0]?
 
@PM2Ring well, there's more than one way to do it...
 
@WayneWerner Yeah. The OP had already accepted that Pandas answer before I got around to posting mine. So I figured I might as well have a bit of fun.
 
12:50 PM
At first I was like, "Why in the world row[0], row[1], row[2], row[3] - you could totally just do tuple(row). And then I realized it was int(row[0]), int(row[1]), and not the others.
 
Earlier tonight I fixed 2 typos for Raymond Hettinger, and got a nice response to a comment about the demise of the cmp function arg to sort / sorted:
@PM2Ring functools.cmp_to_key has a somewhat simple and low overhead pure python implementation and an even lower overhead (almost cost-free) C implementation. The functools.cmp_to_key tool was put in just to handle this sort of extraordinary case of a weird cmp-function. In almost every other case, cmp-functions are the wrong thing to do (three-way compares are generally more complex than boolean key-functions, and cmp-functions are O(n log n) as compared to key-functions which are O(n). SQL's ORDER BY clauses use key-functions and they solve a tremendous variety of real-world problems. — Raymond Hettinger 2 hours ago
 
[int(row[i]) if i < 2 else row[i] for i, row in enumerate(rows)]?
 
@PM2Ring Nice :-) Makes me feel slightly less guilty about my recent [''.join([a, '<>'[(o == "<") ^ (c == "T")], n]) for (a, o, n), c in zip(x, y)], too.
 
should've used an if i<>3 in there
 
@ZeroPiraeus '<>'[(o == "<") ^ (c == "T")] Wow. :)
 
12:52 PM
I can only assume it was on Programming Puzzles & Code Golf
 
700ish upvotes in
looking forward to gold badge!
 
Nice. Sounds painful ;)
 
I'm still almost at eval/2 in :(
 
I guess it's semantically cleaner to write XOR on booleans as != rather than ^, but what the hey. :)
 
I just like all the angles ;-)
 
12:55 PM
rhubarb for now
 
Thanks, Reuven Lerner
 
cbg'noon
 
1:12 PM
So a couple weeks ago I started watching this TV show taking place in a vaguely medieval fantasy setting and I was impressed that they were introducing so many novel concepts to the viewer without insulting their intelligence by taking a lot of time explaining each one. I finished the last episode yesterday, and while searching to see if there was another season, I discovered that I had been watching the second season, not knowing the first existed.
 
what's the name of the show?
 
Now trying to decide if I want to watch the first season, with the very real possibility that they're going to take a lot of time explaining every novel concept that I was already comfortable with after thirty seconds of S2 viewing.
 
DSM
Morning cabbage for all.
 
It was pretty enjoyable but I did have to do a lot of "these people are talking like they're old friends so I guess I'm supposed to accept that they're old friends"
 
\o Monday cbg
 
1:19 PM
o/
 
 
1 hour later…
2:22 PM
quiet Monday morning, guess everyone is busy :\
 
the long st. patrick's day hangover?
 
Don't drink, so I don't have one, maybe you are correct?
did you drink for saint patty's day ?
 
I had a lot of coffee
maybe that's why I'm awake :)
 
This year I learned that you're supposed to spell it "St. Paddy's Day" if you insist on shortening it. I have not learned why, though.
 
@Kevin if you learn why, do share. Also about 3 weeks ago you told me to try uninstalling Python and stuff on my work computer so the weekly clean up wouldn't yield me an ear full. Turns out they have logs for what you install :\ but thanks for the try
 
2:28 PM
> Paddy is derived from the Irish, Pádraig: the source of those mysterious, emerald double-Ds.

Patty is the diminutive of Patricia, or a burger, and just not something you call a fella.
 
I think the only way I can get Python on my system, is if I'm on that newly formed Python team... :\ maybe in a few years :D
 
Oh I see... I can't edited it :\ oh well... TIL
I gues that make sense. I don't hear st. PAT-Tee day, rather st. Pad-dee day.... always thought it was just people slurring their words cause they were drunk....
 
-.-
I like how that site mocks trump....
 
Not sure whether calling it "St Patty's Day" is truly an annoyance to the general Irish populace, or if it's just pedantry from the loudest decile. The people with the opposing opinion of "it doesn't matter" aren't likely to feel strongly enough to register and design a website to make their voices heard
 
2:34 PM
I is here
cbg friends
 
Just like the online review conundrum. The 90%+ people who are happy with the working product is too busy with other things or too lazy to leave a position review. And you end up with mostly negative reviews because those are the rare cases where people want to voice their opinion on something that isn't working
 
Well, whatever. I'll capitulate either way. Being technically correct is its own reward.
 
@idjaw \o cbg Boston tonight :D did you go drinking?
@Kevin I think I'm going to end up calling it. St Pat's day. for short...
 
nope. did not go drinking.
 
I thought about having a drink at home but I couldn't remember which day the actual holiday fell on and I couldn't be bothered to look it up
 
2:40 PM
my wife was working this weekend, so I had to keep the children occupied with activites and them not eating each other.
 
kept your kids from playing the hunger game. I see, unless those activities were pitting them against each other on a remote piece of land.
 
jjj
2:58 PM
hi (or maybe...cbg)
 
cbg o.o
 
jjj
o_O
 
O_o
 
oh there you are BR ..... how goes it
 
Allz fine! Thanks. How bout you?
 
3:00 PM
a few days ago I had to email a co worker named Bhargav (I know that name is common to a degree) but I hoped it might have been you :D
 
Lol, That'd have been fun.
 
weird...I'm trying to figure out the logic in getting -2 rep for a question I answered that got deleted by OP
I can't come up with a valid use-case for this
 
DSM
That'll learn you.
 
@idjaw 1 upvote + 4 downvotes?
 
so your rep is "saved" even if OP deletes his question? I know your rep is "reversed" if you delete your own question
 
3:05 PM
OP must have been a StackOverflow Premium user, which gives him the power to reward fewer than fifteen points for an accept.
"This technically solves my problem, but I'm embarrassed I didn't figure it out myself, and I'm jealous of your avatar, so only two points for you"
 
jjj
hey, does this makes sense: I have a loop in which I do exactly two things: I randomly (ie random.shuffle) choose, say 100 elements from around 600 mils. Then I run some sort of a lookup function on these elements, nothing very complicated. What seems odd to me, is that when I use tqdm to estimate the time it should take, the time seems to be increasing with each iteration
 
@idjaw Weird. AFAIK, any rep changes on an answer get reversed if the question is deleted, unless the question is old, and the answer's score is sufficiently high (+3 upvotes, IIRC).
 
@MooingRawr rep is only stuck after 60 days on positively scored questions
What PM said:)
 
jjj
Does anyone know if this can be triggered by the tqdm inner workings?
 
I don't know what tqdm is, but successive iterations of that loop shouldn't be any slower than earlier iterations.
Except by random chance, ex. the first iteration just happens to do the lookup very quickly because all the items just happen to be near the start of the list
 
3:09 PM
@jjj 1/ you shouldn't use shuffle to choose something, you use choice.
 
@MooingRawr I think he wants to choose K elements from a list, but choice only lets you get 1 element from the list.
 
tqdm looks interesting.
 
And "just call choice K times" leaves open the possibility of getting the same result more than once
Oh, maybe sample is appropriate in that case.
 
@Kevin well hes very broad I took it the other way... I see nvm then
 
jjj
yup, @Kevin is correct
I want to be able to get the same elements more than once
 
3:11 PM
"Return a k length list of unique elements chosen from the population sequence or set. Used for random sampling without replacement." That "without replacement" is the sought-after quality we're seeking after soughtfully.
 
I should stop :D have at it Kevin
 
@jjj Ok, so I'm wrong then. sample is if you don't want to get the same elements more than once.
 
@AndrasDeak I see thanke you :D
 
Unless you mean you want to not get the same elements in a single iteration of the loop, but don't mind getting the same elements between loops, in which case I'm not wrong
 
jjj
Thats what I wanted indeed :)
 
3:16 PM
oh 3.6 introduced choices() interesting....
> Return a k sized list of elements chosen from the population with replacement.
 
@jjj In that case, there's not much point using shuffle, just call sample on each loop. That will be much faster than shuffling the whole huge list on every loop.
 
I should read the change log for 3.6
 
@PM2Ring @BhargavRao here is the question in question. It's low quality and answered in the beginning of my rep collection journey :P But...as you can see no upvotes or downvotes. I just can't figure it out
 
choices looks quite handy. Every couple of months I'd see people asking how to randomly choose from a sequence in a weighted manner, and this will do some of the heavy lifting for them
 
3:18 PM
Of course!
 
Although actually choosing which weights to pass to the function might still prove a challenge, because the question-askers are usually not entirely clear on that
 
Ha! Great catch @BhargavRao
 
@BhargavRao this is why you are blue :D
 
I used to get rep for edits at the beginning. That's why! mystery solved. Great job team.
 
"I want a bell-curve distribution". All right, but what kind of bell? There are an infinite number of them.
 
3:19 PM
@BhargavRao I was just about to say that. :)
 
5000 points Hufflepuff
 
@idjaw Been there done that. ;)
 
@Kevin just ring all of them :D make that your goal in life
 
@PM2Ring I've got ninja-ing lessons from Joncle and Martijn. :P
 
jjj
@PM2Ring thanks!
 
3:20 PM
My life is too short to ring infinity bells, even if I create a swarm of nanobots that consume already-rung bells to increase their numbers and exponentially ring more bells
Even the mighty O(log(n)) must bow before n=∞
 
Just create a small team of androids to ring it for your after your long gone. Bonus points if the androids can fix and populate themselves. Just make sure you don't allow 'memory' transfer between them. :D
Also give them the capacity to space travel or figure space travel, to collect more resources to continue the chain. Some parasite style, until all the universe's resources are all sucked up because of your desire to ring some infinite bells....
 
I would say that entropy would eventually doom any such plan, but I'm not sure if entropy exists in the Platonic Realm of Bells
 
on second thoughts that might turn out poorly for the rest of "living-things".
 
You thought it would be paperclips, but you were wrong! It was bells all along!
 
@jjj If the list you're sampling from is just a range of integers, you don't even need to build a list in memory. From the docs:
To choose a sample from a range of integers, use a range() object as an argument. This is especially fast and space efficient for sampling from a large population: sample(range(10000000), k=60).
 
jjj
3:26 PM
Well, I had to do this in 2.7 so I used xrange. But thats good to know this is how it should be done
 
@Kevin anything can destroy humanity, heck even humanity is destroying humanity.... I'm starting to think humanity's destiny is to be destroyed.
 
If only there were a countably infinite number of bells, I could arrange a rube-goldberg-esque setup where each bell causes the next bell in the chain to start ringing. But the bells are isomorphic to N-tuples of reals, so they're uncountably infinite and thus probably arranged in a manner unfavorable to such a plan
@MooingRawr Second law of thermodynamics confirms this. Our only hope is finding a universal escape hatch a la The Last Question.
 
How close are the bells together? can we do some Newton's cradle thing?
 
Only if the bells were countably infinite. But they aren't, unless we want to limit ourselves just to bells that are made up of conventional matter and thus have an integer number of atoms.
And round down positions of atoms in 3d space to the nearest planck length. But that's cheating if you ask me
 
Or maybe when one bell is rang, it gets formed into a new bell, reusing the matters... or is that cheating and not infinite bells anymore?
Cause would that means you always have x amount of bells on hand when not rang... actually that would mean it's countable... nvm
 
3:31 PM
I think there are just too many unanswered questions about the Bell Dimension to form a conclusive plan
 
Let's ask what-if :D but IIRC he doesn't like answering infinite style questions
New plan, let us set out to answer those unanswered questions on this bell issue, in hopes we (as humanity) can solve it.
I think that might be harder than the original problem, this hole keeps getting bigger..... I know we should keep digging ourselves into a deeper hole, at one point we will pop out on another side..... or melt at the core...
question, did we invent those heat-resistant astronomer, if so can we employ them to dig this hole ?
 
DSM
There being only One True Bell, I'm not sure what to make of this conversation.
 
so a few days ago, someone was hoping to type(0.132) to be >int now someone wants to turn type(custom_class) to be >some random string OP created I wonder if there's a prof out there that made a silly challenge to their students to change type()....
 
3:46 PM
stackoverflow.com/questions/42907790/… if anyone agrees with the dupe, go for it.
 
3:57 PM
hmm I seem to am thinking stupid again: if I have a list comprehension like: [foo(x) for x in y] And foo can throw a certain exception, can I "ignore"/"skip" those elements? Other than rebuilding it to a forloop?
 
Oh hey, it's that thing I said that happens sometimes.
Mar 17 at 13:34, by Kevin
Occasionally you see people asking "How do I do [f(x) for x in seq] so that it only aggregates the results where f doesn't raise an exception?"
Answer: there's no built-in way, no
 

« first day (2347 days earlier)      last day (2609 days later) »