« first day (2748 days earlier)      last day (2218 days later) » 
00:00 - 16:0016:00 - 00:00

12:00 AM
Rhubarb @AndrasDeak Time I was off too...
Rbrb all. :)
 
12:15 AM
@chrisz how'd you do that?
@AndrasDeak that doesn't leave much memory for pycharm
 
I dropped a mini-fridge on it lol
 
cabbage
 
wim
1:09 AM
@AndrasDeak see, I do love itertools
 
@BitcoinMurderousManiac I recall Silicon Valley show in which the CEO hates anyone who uses spaces in place of tabs
 
1:34 AM
@chrisz at work?
 
recbg
 
1:51 AM
the guy screws up his chance of ____
look at the top comments :-D
rbrb potatos
 
2:09 AM
of what?
oh sorry are you referring to that video? I haven't seen it yet
 
@cᴏʟᴅsᴘᴇᴇᴅ you definitely should watch silicon valley
It's the best show on TV and the interwebz
 
2:35 AM
@Code-Apprentice, nope, I was drinking at like 3 in the morning and it seemed like a good idea to move my mini-fridge into my bedroom
 
3:14 AM
@chrisz hope you get better soon
 
cbg
 
cabbage
Is there a performance or any other hangup aside from readability for doing this:
line.split('|||')[0].strip()
vs
line = line.split('|||')
line = line[0]
line = line.strip()
 
3:31 AM
In [1]: def foo(line):
   ...:    line.split('|||')[0].strip()
   ...:

In [2]: def bar(line):
   ...:    line = line.split('|||')
   ...:    line = line[0]
   ...:    line = line.strip()
   ...:

In [3]: %timeit foo('aaaaaaaaaaaaaaaaaaa|||aaaaaaaaaaaaaaa|||aaaaaaaaaaaaa|||')
594 ns ± 2.1 ns per loop (mean ± std. dev. of 7 runs, 1000000 loops each)

In [4]: %timeit bar('aaaaaaaaaaaaaaaaaaa|||aaaaaaaaaaaaaaa|||aaaaaaaaaaaaa|||')
622 ns ± 4.71 ns per loop (mean ± std. dev. of 7 runs, 1000000 loops each)
 
Fair enough, I guess if I'd been thinking, I'd've done that myself. Thankyou
 
 
2 hours later…
5:40 AM
cbg
 
5:50 AM
cbg
 
6:02 AM
For pandas , is there any difference between using df[col] = df[col].apply(lambda x: x.lower()) and df[col] = df[col].str.lower()
I ask that because, It seems I cant use df[col].str.lower().strip()
I can use apply with lambda x: x.strip().lower() though
 
recbg
 
6:24 AM
cbg
 
7:01 AM
cabbage
 
@Ajit I don't know much pandas, but does df[col].str.lower().str.strip() work?
 
cbg
 
@Aran-Fey it does work yea
but looks kinda ugly imo
 
i'm confused between a bot and a script, which one is more convenient?
 
Should this be closed as a dupe of this?
 
7:16 AM
I think so
On a second thought, the second one is asking about a problem in his code. Not how to use global variables. Even though the answer would be the same
@ZenB883 Can you elaborate more?
 
7:42 AM
cbg
@Aran-Fey similar lines, but not exactly same. I would want it to be separate.
@Code-Apprentice Firefox and it's inactive "unloaded" tabs is the key. Switched from Chrome, never feel like going back.
 
cbg
@AshishNitinPatil Have you run your Python application on docker manager by supervisr?
 
@FrankAK That's quite a specific and individually targeted question. Nevertheless, yes, I have Python application running on docker. I don't understand the latter part of your question (docker manager by supervisr).
 
I mean if you have more than one Python Application, How do you manage those applications?
 
Multiple on the same machine?
Depends on the ports requirements though.
 
On the same Docker container
 
7:55 AM
You shouldn't run multiple apps on the same container.
Each container should have a separate task / job.
 
I want put all my applications into the same container, so i want to use supervisor to manage those .
but they have related each other ~
 
@FrankAK Did you consider using docker-compose ? docs.docker.com/compose
 
@FrankAK So, have them communicate with each other.
^^ docker-compose simplifies a lot of those things
 
Hey ,I haven't try compose
Okay ! Thank you guys ~
 
8:00 AM
The docker-compose examples are very nice, it'll be easy to understand and integrate your multi-service / multi-app thing and bind it together.
 
yep, but my python app basic on tensorflow which need GPU support! no sure if docker-compose can do that ~
 
you can still define docker containers whichever way you like, including telling it about devices like GPUs
 
okay ! i will try it ~thx ~
 
8:42 AM
Guys, is there any difference between operator.truth and bool?
 
> Return True if obj is true, and False otherwise. This is equivalent to using the bool constructor.
 
Oh, the second sentence didn't show for me when I issued help(operator.truth)
Melon
So the obvious follow up question is why would operator.truth even exist.
 
Yeah, the interactive help usually isn't as detailed as the docs
 
I'll throw in the default case of 'historical reasons'.
But I don't know how to access very old python docu to verify it
nevermind, i found out
 
In [171]: %timeit list(map(bool,range(int(10E6))))
1 loops, best of 3: 801 ms per loop
In [172]: %timeit list(map(operator.truth,range(int(10E6))))
1 loops, best of 3: 579 ms per loop
:P
 
9:14 AM
Seems I was right. operator.truth was added in 1.5.2 and bool in 2.2.3. I won't check when the note about them being equal was added to the docu.
 
9:31 AM
Cabbage
 
cbg =)
 
10:04 AM
@Ajit Another benefit of collection.deque that wasn't mentioned is that it's faster than using a plain list. That should be obvious if you're using it as a queue, since popping from the start of a list is expensive, but it's also faster than list for implementing a stack. Of course, this is assuming that you are actually using it for stack / queue operations. If you need to add items at weird places (not at the end or start), then you shouldn't be using deque.
@Kevin "that example is very strange because completed is an argument to the function" Using a default immutable arg is a fairly common way to add a static "variable" to a Python function. So each call doesn't need to re-create a completed object, it can use the one that was created when the function was defined. (Of course, the assignment creates a new completed, but that only happens in the exception).
I guess it'd be more idiomatic in Python to not have completed and just return False or True directly, but it adds a little bit of self-documentation, and some people really don't like to scatter multiple return points through a function.
 
@PM2Ring Thanks. Someone also pointed out that implementation of breadth first search is faster with deque. It think it relied on pops on either side as well.
 
10:21 AM
@Ajit No, it just uses a FIFO queue, so it always pops from the front. Eg en.wikipedia.org/wiki/Breadth-first_search#Pseudocode Calling some_list.pop(0) is quite expensive because all the remaining items have to be moved down to fill the gap. Sure, this happens at C speed, and only pointers are being moved, but it's best to avoid it if you have an alternative.
 
viewed 20k times and has a total of 5 votes on it
 
Yes, you're right
 
10:51 AM
@toonarmycaptain To improve performance you should be passing maxsplit=1. Or consider using .partition instead of .split.
 
@wim ugh, I don't want that crap to go HNQ.
cbg
 
11:27 AM
What's everyone's opinion about reposting code from the question as an answer? If the question is something like "I'm looking for a better solution than X", is it acceptable to post X as an answer? I think that should be allowed, because sometimes X is the best solution there is, and someone who finds the question on google might not read the question properly and might think that that code doesn't work, and end up copying a worse solution from one of the answers
 
No, a comment would suffice.
 
in that case I'd just answer "The X you already have is as good as it gets". You can't cater to the needs of the illiterate on SO
 
It's not really about illiteracy. When you find a SO question on google, how much attention to you really pay to the question body?
 
What Andras said. I'd probably just post it as a comment, unless there's a good reason to explain why X is the best solution.
 
11:30 AM
Weird, I got a +19 rep notification, but I can only see one upvote and even with some deleted downvoted answers I can't see 19. And if there were an upvote and an unupvote, that should show up in the rep history...unless it was on another site
 
Me, I just take a short glance, think "yup, this looks like the thing I'm looking for", and then move on to reading the answers
 
@Aran-Fey if the top answer is "what you have is fine", you go and read the code in the question
if that's not the top answer, what are we even talking about?
 
Ok, makes sense
 
When looking up old stuff on SO (in contrast to looking at stuff that I want to answer)I have a quick look at the question, but I don't pay it too much heed. After all, the OP is often the least well-informed contributor to a page.
 
yup
 
12:02 PM
Yamming OPs that post code that doesn't actually reproduce their problem... stackoverflow.com/questions/50020111/…
 
12:18 PM
@PM2Ring you're back!
 
Hi, Andy K!
 
12:39 PM
I'm so glad I don't have to answer questions anymore
 
you never "had" to
 
You have a point there. But the hammer was worth a month of suffering. I think.
 
1:01 PM
hi all
from .app import something
is the period in .app have some significance or just a naming convention
 
"python local import"
 
.app just means app?
 
Did I say ".app just means app"?
 
i mean just a file man cmon
don't scold me
 
It's a relative import. from x import y will import x from the standard library, while from .x import y will import x from the directory where your script is
 
1:06 PM
bah, s/local/relative/, I guess we're even, sorry
 
(Disclaimer: That explanation is slightly simplified and not 100% accurate)
 
where is the source?
 
it's only 3 PM but my brain doesn't work
 
"only 3PM" :/
 
@AndrasDeak not yet or not anymore?
 
1:07 PM
not anymore
 
haha
 
oh. I thought you meant "not yet".
 
nah :D
 
@Luca Did your brain ever work?
 
man you are in a very bad mood
 
1:08 PM
that would've been "it's already 3 PM but my brain still doesn't work yet"
 
what is up
 
@J.Ende It stoped working when I started a ASP.NET project
 
The sky
 
ofc
there is god too
more up
 
But what comes up goes down
 
1:09 PM
sky never comes down so does god
 
Hey guys! I created a new environment (with python 3.5) but I can't use conda to install packages in there. The original is working fine, do I have to create a new system variable or something?
 
best way to chill out the burned mind anyone knows?
 
@Alema-Z how so? Does conda install -n envname packagename not work?
 
it gets me conda isn't recognized as a command
 
@kanishktanwar well my way of doing that is to listen to some chillstep and go into a chat like this one
 
1:12 PM
well this line gave me answer, dont dig deep
foo = __import__('foo', globals(), locals(), [], -1)
 
@Alema-Z where are you trying to do that?
I'm pretty sure you should do that the same place where you did conda create ...
 
in the anaconda prompt for the enviroment
 
is it somehow refers to sublime text i amy be useful
 
Anaconda Prompt(py35) as I called it
but in Anaconda Prompt (wich is the original) work just fine
 
huh, I don't know then, sorry. I don't actually use *conda
 
1:14 PM
np, gonna ask in the question section them
thx
 
@luca well i am doing exactly
10/10
 
haha
 
Or watch someone do something. twitch.tv
Twitch is mostly games though.
 
I would normaly do that, but I can't now since I am at my internship now :(
 
1:16 PM
mostly flaming
 
you can mute the chat, or ignore it.
 
btw why one want to import files locally i am brain dead
 
@AndrasDeak You were right, that worked thx
 
@kanishktanwar if you only have scripts in your local directory, just importing them is fine. Relative imports start to matter when you're using proper packages, I think
@Alema-Z glad to hear that, no problem
 
Do people even use relative imports? All packages I've seen assume that they're installed and use absolute imports to import themselves
 
1:19 PM
apparently they are using in flask
 
I posted an answer to this SE.physics question when it was fresh. But I posted it as a comment because I was on my phone and didn't have any refs to back up what I stated. A diamond mod said it should be a proper answer, and politely reminded me to not post even partial answers as comments.
But instead of copying my comment to a proper answer I simply deleted it. And now the question's in the HNQ and I probably would have scored quite a few points. Oh well.
 
@Aran-Fey Yep, helpful when you think you might change the naming / parent directory
Otherwise, not that great, since it might cause issues later with structural changes
 
+1 that
 
But that's why I primarily use it. Also, lazy.
 
o/
 
1:22 PM
cbg
 
congrats @Aran-Fey
goooooooold
 
gooooooo old? :-p
 
@Ajit Ok, I read 7.6 p181, and now I'm 100% sure that the function(s) it's talking about use pass-by-reference semantics. It talks about "output parameters", which are variables that can be reassigned inside a function, and the new value will be accessible outside of the function. In the examples, both formattedReport and outputStatus are output parameters.
 
+1 to Aran explanation too regarding relative import
 
Flakiness on the main site: I'm getting a generic 404 page.
 
1:28 PM
random post works for me
 
Python does not have output parameters. If you pass a boolean (or any other immutable value) into a function, it is very hard to change that value in the calling scope, and even attempting it usually results in a horrible design. I don't even want to mention how one might try, the techniques are so poisonous.
 
rant: mkdocs has no way to preserve casing when displaying in a nav. It makes me want to burn things to the ground
how did they not think of the very common use case of using acronyms
DNS looks like Dns unless I keep it as dns
it's dirty, ugly and makes me want to scream
and apparently they are putting their foot down on it
 
The TLDR of the author's point is: when writing a function that can fail, you can return a boolean indicating success, or you can assign the success value to an output parameter; both are valid designs. He would also prefer that you write the logic on two lines, separating the function call from the success-checking conditional. I think this is good advice, if the language you're using has pass-by-reference, (and if you aren't allowed to use exceptions, for some reason)
 
@idjaw Thanks :)
 
@idjaw sounds really bad
 
1:35 PM
Did I mis something or did stack overflow just crash and die for a few seconds?
 
no. just you
bring back your computer. your day is over
 
okay good, so I wasn't just seeing things
 
@AndrasDeak it's very strange they would enforce a hard coding like that
 
@cᴏʟᴅsᴘᴇᴇᴅ ya i feel it too messages coming late
 
willing to bet someone's going to make a meta about it soon
 
1:40 PM
@cᴏʟᴅsᴘᴇᴇᴅ really?? windows server??
(IISc)
 
jjj
cabbage room 6
 
I think the devs might be trolling with the error pages
 
Project report: my coworkers often ask "is the Internet working for you?" when our router goes down. I am trying to create a little LED cluster that lights up red/yellow/green depending on my Internet strength. I dug out the Arduino I got last year and I can toggle the LEDs I plug into it, using commands sent from pyserial. Now I'm trying to figure out whether it's possible to connect everything together without a breadboard and five lengths of wire.
 
just checked and it indeed isn't April Fools :D
 
1:44 PM
@Kevin without a breadboard it will be a mess, unless you are good at taping / binding things nicely.
 
The circuit itself is quite simple: the three LEDs are connected at one end to pins 11, 12, 13 respectively, and the other ends all go into the ground pin.
It's just kind of geometrically hard to cram all three LED legs into the one ground slot
 
@Kevin you get pins for that? or that might be unnecessary. Just bind those together and have a single wire dig in to the slot.
 
My box o' electronics is pretty spare, the only things in here that could conceivably bind any wires together are these knobby bits, as seen on the second picture of this breadboard
If you're saying I could just stick one led's leg in the pin and then wrap the other two led legs around that leg, I could try it.
 
yeah, or have a wire do that, while all 3 legs wrap to the wire
you might end up with some loose ends in the air, like this ce-forum.s3.amazonaws.com/optimized/1X/…
single core / strand jump wires feel like a blessing
 
windows server has its place
and sometimes you just have to
 
1:57 PM
@AshishNitinPatil Old-fashioned telephone cable contains multiple insulated wires, with each wire being single core.
 
Hideous, yet functional.
 
The green one's positive end is very close to the red one's negative end, which I hope doesn't screw anything up
 
@idjaw no denying, but it is painful enough.
 
At least, that's what the telephone cable's like in Australia. A few metres of such cable kept me in hook-up wire for years. :)
 
1:59 PM
I think if they touch, all that means is that the red one will weakly illuminate whenever the green one does
 
@Kevin taping fixes it (insulation)
 
Or, hmm, would it illuminate at full brightness. How does electricity work again?
The electricity goes through the green one, and the light uses up all the stuff, and just a little bit trickles out and goes into the red one.
 
pretty much full brightness. Don't think it'd matter much for small LEDs (since only 2), IIRC.
 
@Kevin all that would do is just devide the Voltage over both lights I beleve
although it has been quite a few years since I finished my school for Electician
 
voltage stays the same, it's the resistance that grows (reducing the current flowing) in serial connections (non-parallel)
And I'm not sure for the same reason :-p ^^
 
2:03 PM
@AshishNitinPatil If only they had a proper headless version that was really functional in a console, it would make it that much faster to provision
but it's so damn heavy
 
that reminds me. The tutorials suggested putting 220 ohm resistors on the negative end of each led, but that would require an additional million wires in my design, so I skipped them. Is that a bad idea?
 
but I don't think it is widely adopted yet
 
@Kevin you might nuke your LEDs
resistor helps bring down the Amperes (current)
 
2:04 PM
They haven't been nuked during my test runs. Does that mean I'm safe, or does it continue to be a risk as I continue using them? I intend to have this thing running eight hours a day, after all.
 
@Kevin You really should have those pull-up resistors, but you're circuit's probably safe if it's running on very low voltage, no more than 3 to 5 volts.
 
@Kevin maybe it works for now, but I think they still don't really like it, so maybe they will break in the long run
 
unsure, but seems okay if it ran during test runs. mainly because of Arduino's safe voltage limits ^^
 
stop testing
 
My board runs at... Let's see... 3.5 volts
 
2:05 PM
just push to prod
 
&#*% it, ship it
 
I only have the one Arduino, so my dev environment is the prod environment.
 
but you haven't deployed, so it doesn't count :-p
 
I have like thirty LEDs in my treasure chest of engineer dreams, so I think what I'll do is, skip the resistors, and if these ones fizzle out then the ones I replace them with will have the resistors
 
Kevin is doing what everyone should do.
 
2:08 PM
FWIW, I once did a CMOS circuit that had a LED that had both of its legs connected to logic outputs (rather than having one leg connected to a voltage supply line). So the LED would light up iff it got a 1 on the appropriate line and a 0 on the other. That saved me having to use an inverter and an AND or OR gate. :)
 
Just have enough funding to keep replacing the thing in production until it works
#Tesla
 
no biggie if you lose the main rocket as long as your car makes it past Mars
 
> When I started here, all there was was swamp. Other kings said I was daft to build a castle on a swamp, but I built it all the same, just to show 'em. It sank into the swamp. So, I built a second one. That sank into the swamp. So, I built a third one. That burned down, fell over, then sank into the swamp, but the fourth one... stayed up! And that's what you're gonna get, lad: the strongest castle in these islands.
4
 
That's an interesting way to build.
 
At what point were the workers told to go home without pay for several weeks while they tried to figure out how to fix the fourth one that finally worked?
 
2:12 PM
what workers? The ones who got buried, or those that were injured (later killed)?
 
I guess I should figure out now what I'll need to construct v2.0 once v1.0 inevitably fails. What's a good way to securely connect a resistor to an LED? Is a soldering kit overkill?
 
@Kevin It is defenately better than welding them
 
single strand demands soldering, otherwise the connection is shaky and fluctuating.
 
@AshishNitinPatil BOTH!!!! they were both being paid so you have to collect that money back
these rebuilds aren't gonna pay for themselves
 
I need, like, a breadboard, but it only has two holes
 
2:14 PM
you can always loot the dead? or is that too morbid.
 
By "securely" I mean, it only has to work while it's sitting in the corner and nobody's touching it or making the floor vibrate
 
Breadboard and soldering gun are relatively easy to find though.
But resistors and the likes can be difficult.
 
@Kevin You should be ok. If a LED dies and goes open-circuit all you lose is a LED. OTOH, if it somehow becomes a short-circuit it will put a little bit of stress on your Arduino, but I assume it's got some current-limiting protection built in.
 
@Kevin what can happen is that both legs of your green led will be short-circuited, and it won't shine
 
cbg
 
2:18 PM
cbg
 
@AndrasDeak That's fine. "It temporarily doesn't work" is at the bottom of my failure mode rankings, in order of increasing consequence. The remainder are: all the leds permanently break; the Arduino permanently breaks; my desk catches fire; one of my coworkers says "what's that thing with all the wires?" and calls the bomb squad in who then safely detonate my desk
 
but yes, that would also imply a short from red's + to green's -, so PM 2Ring's remark applies
 
@Kevin "safely detonate" is that a thing?
 
use nail polish to insulate the legs? :P
 
Interestingly, the more wires and things I add to prevent the earlier failure modes, the more likely the last failure mode becomes
 
2:21 PM
Hey, docs.python.org/3/library/weakref.html#finalizer-objects at third example in => newobj, func, args, kwargs = _ what is that underscore means?
 
@OneRaynyDay In the sense that they get a good idea of the blast radius, and make everyone stand outside that radius, yes
 
@Teomanshipahi _ is the result of the last non-None-valued unassigned call/expression in the interactive shell
 
@Teomanshipahi result of the previously evaluated expression
 
@AndrasDeak ah OK, I was running in IDE that's why it was complaining
 
yup
 
2:22 PM
anyway to make it run in IDE?
 
explicitly name the return value
 
Right, thanks.
 
newobj, func, args, kwargs = f.detach() basically
 
@AndrasDeak perfect! thanks and @vaultah
 
no problem
 
2:32 PM
Hmm, I wonder why, when I ping google at work I get Reply from 172.217.7.228: bytes=32 time=37ms TTL=56, but when I ping it from home I get Reply from 2607:f8b0:4004:806::2004: time=21ms. What happened to my bytes and TTL values, and why is the ip address all goofy looking? Is that one of them ipv6 things?
 
probably, yes
 
Yes it is
 
morning cabbage
 
And do you run ping commands on different platforms?
They might just default to showing different info
 
It's the same computer. I bring it home to telecommute.
 
2:34 PM
Can you prove that the ping defaults aren't governed by geofencing?
 
I don't know how I would prove such a thing. Work and home are on different sides of the PA/NJ border, so that might have something to do with something.
 
@PM2Ring Interestingly, when I'm only expecting one split to take place/only one split is tested, maxsplit is slower. Partition was substantially faster though, thanks!
@Kevin Not something about how the different routing or home/work network protocols process the request?
 
I see that ping has a -4 flag that I can use to force ipv4. That solves my practical problem: my network monitor program only knows how to parse ipv4 ping messages
 
cabbage all, btw
 
@toonarmycaptain I was also thinking that. Maybe the sad dusty potato we use as a router at work just doesn't have ipv6 capabilities.
 
2:37 PM
@AshishNitinPatil Maybe I'll have to try out firefox...for development, I'm much more familiar with the Chrome dev tools than the FF ones.
 
@Kevin Poor potato
 
@Code-Apprentice yeah, FF is not so friendly for that IMO, and it also gets the formatting all wonky (especially for dropdowns)
 
@toonarmycaptain If there is only 1 possible split, then yes, using maxsplit is slower because it has extra overhead. But .partition has no such overhead. FWIW, I never bothered using .partition, it seemed silly to have such a method when you could achieve the same thing using .split. But then I noticed Martijn recommending it... :)
 
@AshishNitinPatil yah, I've been fighting FF support for the last week. Getting the CSS to work in both Chrome and FF is a nightmare.
 
@Kevin Or it's configured to use IPv4 for historical / compatibility reasons.
 
2:40 PM
finally had to get some help from a senior dev that had some tricks I didn't know
 
@Code-Apprentice I've given up on that. I just assume that the Firefox users will have some sympathy (why else would you choose FF over Chrome, if you aren't a normal user).
@Code-Apprentice please provide some links if you get time
 
Our client is picky about it...and if they pay for FF support then they get it.
 
@PM2Ring It wasn't a crazy difference, in my usage, but on the order of 0.887μs vs 1.69μs.
 
@AshishNitinPatil links for what?
 
> senior dev that had some tricks I didn't know
 
2:42 PM
we just worked it out in person. No links available. And the software we make isn't public.
 
why else would you choose FF over Chrome, if you aren't a normal user <- until recently, Vimperator :'(
 
@Kevin I was thinking even more benign, in terms of some protocol implementation somewhere not passing the number of bytes, or the IP in a different format. Does it correct the format when you force iIPv4?
 
I might be convinced to make an MCVE some time to illustrate...
 
@toonarmycaptain Yeah. With the -4 flag, the ip address looks ipv4-ish, and the bytes and TTL entries are present.
 
@Code-Apprentice alright, nvm
 
2:46 PM
Now that the parser problem is fixed, the Deluxe Network Monitor with LED Readouts (& Knuckles) is working for the first time 🎉
Or at least it's 66% working. The red and green lights work. I don't know how I can trick my connection into giving me 50% packet success in order to test the yellow one
 
@AshishNitinPatil the initial issue was a React Bootstrap <FormControl> select element wasn't handling mouse events correctly in FF. So I replaced it with a <Dropdown>. Then rendering was all wonky and I spent most of two days fiddling with the CSS to get it to cooperate.
anyway...time to head to work. Momentary rhubarb
 
:thumbs_up: rbrb
 
@Kevin something something mock
Enough to fool your parser
 
DSM
Midweek cabbage.
 
Cabbage
 
2:59 PM
Bah, after hearing some praise for The Laundry Files in here the other day, I wanted to check it out, but my library doesn't have the first book in its system
 
DSM
I once had to rely on a stranger on the net to send me a free copy of book #2 in an out-of-print book series.
 
The earliest volume it has is #3, The Fuller Memorandum. I wonder if I ought to just skip the first two.
I don't know how much continuity there is among them
 
DSM
3:13 PM
It's more fun than it should be just reading through generated word lists.
 
This can only be the work of Zombie JRR Tolkien
 
Ugh firehose burn.
 
@DSM I didn't read E. E. "Doc" Smith's Skylark series until a decade or so ago. When I was a kid, my local library had his Lensman series, which I loved, and it also had the Skylark books, but I thought a book was missing because the sequel to the original Skylark is named Skylark 3...
 
Django is great when it works
searching for a needle in a haystack when it doesn't
 
3:30 PM
+1 Kevin nice explanation
 
3:49 PM
You lot who have been at this awhile: How did you deal with the 'firehose' problem?
I'm starting to develop my own project and am suddenly faced with needing/wanting to/trying to learn/achieve some competency with OOP, logging, testing, git, working with a database, packaging, learning a web framework or GUI, continuous integration, etc all at once. It's like going from the sippycup to drinking from a firehose.
 
@toonarmycaptain You start, you fail, you try again, you fail less, you run into a problem, you seek help, you improve, you rip everything out and start over, you fail, you learn, you grow, you succeed.
At least, that's my recipe.
 
@toonarmycaptain pick one thing and work on it
 
@JGrindal Do you still have hair? lol
 
My process at that stage was/is something like:
- learn only one thing at a time.
- learn only as much as you need in order to achieve your goal.
- remember what your goal is.
- if it's stupid and it works, it isn't stupid.
 
@toonarmycaptain for now.
Learning one thing at a time is good advice - one advantage to python is that there's a lot of things that work right out of the box - you may want to work on optimization down the line, but you can just drop in modules that do what you need them to do until you figure out HOW they're doing them later (or never)
 
3:56 PM
@toonarmycaptain make prototypes of each thing
and then hook it up together
and then you're done
 
If you build your code in a modular manner, this is a total nonissue.
(this is a big 'if' when you're starting out, though)
 
Mad computer scientist Tarn Adams, creator of Dwarf Fortress, teaches us: losing is fun.
 
@JGrindal This I am attempting.
 
If you've never failed at anything, then you haven't been ambitious enough.
7
 
I'm really disappointed with the model versioning in django - is django-revision really the most popular package...
 
3:58 PM
Hello Guys, I have a pandas dataseries and I wanted to apply regex function to the dataseries to extract certain details. I have written a simple 5 lines of python code to do the job but somehow something is wrong and getting an error "TypeError: expected string or bytes-like object". If someone is familiar with pandas dataframe, can you please provide some pointers?
Here is the link to the code pastebin.com/raw/YTAHhXHR
 
the docs' have only quick starts, and the quick starts don't even pass assert tests
the little bit of API information they have don't mention different kwargs to pass in
 
@GokulnathKumar I suspect that string inside your get_matches function is not actually a string. You can determine its actual type by doing print(type(string)) before you try to call search().
 
00:00 - 16:0016:00 - 00:00

« first day (2748 days earlier)      last day (2218 days later) »