« first day (3260 days earlier)      last day (1689 days later) » 
00:00 - 16:0016:00 - 00:00

12:04 AM
@Code-Apprentice I like to try to keep it all on the Path object:
>>> from pathlib import Path
>>> foobar = Path('foo') / 'bar'
>>> foobar.parent.mkdir(exist_ok=True)
>>> foobar.write_text('foobar')
6
>>> foobar.read_text()
'foobar'
mkdir takes parents=True to make the parent dirs as well...
 
Children making parents, oh what a time to be alive!
 
Now if we can just eliminate death and taxes...
Nice thing about the methods is they use the context manager so you don't have to...
 
1:05 AM
is there a difference b/w import times for os.getenv and os.environ[]? The former works with gunicorn but the latter gives an error
 
1:21 AM
anyone there?
 
1:49 AM
@αԋɱҽԃαмєяιcαη close to my bedtime, but what's up?
@-me or else I might miss you...
 
cabbage young people
 
2:04 AM
@ReblochonMasque do you like Tintin?
 
I do!
Tintin and Asterix
 
@AaronHall please check what's wrong with my parse
import requests
from bs4 import BeautifulSoup

response = requests.get(
"https://www.blockchain.com/btc/address/1Nh7uHdvY6fNwtQtM1G5EZAFPLC33B59rB")

soup = BeautifulSoup(response.text, "html.parser")

total = soup.select(".col-md-4 col-xs-12")
print(total)

# why it's not printing out the section of dev Total Received ?
# for better view. https://repl.it/@AmericanY/Blockchain-Parser
 
@αԋɱҽԃαмєяιcαη I hesitate to do a get on such a url.
 
@AaronHall sorry am new to this. just learning how to parse
 
don't post more here, perhaps put the html text in plain text there, and pass it to beautiful soup, and I'll explore it a bit.
 
2:22 AM
@αԋɱҽԃαмєяιcαη try soup.find_all("div", class_="col-md-4 col-xs-12")
 
@AaronHall that's work. thanks
the issue were about class to class_
 
IDK if that's really what you need, but ok. strangely enough I have a post answering this very question: stackoverflow.com/a/39831838/541136
passing like this gives you a different result: soup.find_all("div", class_=["col-md-4","col-xs-12"])
I believe the list matches on any, while the string would be exact...
I did that a long time ago for a class I was teaching, and felt it needed a better answer...
Looks like a new answer has an even better lineup of suggestions: stackoverflow.com/a/56267837/541136
 
2:42 AM
@AaronHall that's amazing
 
@αԋɱҽԃαмєяιcαη yes, the best answers do rise to the top - we just don't say when.
 
@AaronHall yea, you are correct
@AaronHall repl.it/@AmericanY/Blockchain-Parser < could you take a look, why i couldn't access total_received ?
 
3:14 AM
Hmm. solved it by print(total[0].text)
 
@αԋɱҽԃαмєяιcαη good job. it's quite amazing how much we can actually do without any help whatsoever...
I miss this being pinned:
Aug 20 at 9:35, by PM 2Ring
Imagine that you won a competition, and the prize is a free session with a Python think-tank who normally charge $1000 per hour. Don't waste that prize!
 
 
3 hours later…
6:34 AM
Hello, I am supposed to implement rail fence algorithm in python, I have written the code but I have no idea why am I getting the wrong output despite everything seems to be fine. This coding challenge is deadly for me. Here is the code:
 
do you have a Stack Overflow question about this? just dumping a link to code is not good practice
here is a repl.it but we have no idea what it's supposed to print or which parts you need help with repl.it/repls/WeepyWideeyedCgibin
@AjayMishra ^
 
Oh, Sorry. It is printed duplicates, even when there is only one d in my string.
 
> do you have a Stack Overflow question about this? just dumping a link to code is not good practice
what's the actual assignment?
 
Here is the link.
 
user10984358
Heya guys, is there something like “thinking generatively” you know like when people say think recursively, all I know about generators is that it’s like a list but one time use and lazy execution, I’ve never used yield and stuff.
 
6:44 AM
this continues to look like you are trying to subvert the room rules. You should have a question on Stack Overflow, then if you don't get it resolved within 48 hours, you are welcome to ask us to take a look
 
@tripleee It is usually suggested there to ask small thing in chats not on the main site.
 
user10984358
@Kevin linked me his answer which linked me to generators and I believe I need to know more about that to understand that.
 
yeah but "review my code and guess what it's supposed to accomplish" is not "small"
 
Okay. Sorry, Ignore this question.
 
7:03 AM
@TheNamesAlc maybe something like stackoverflow.com/questions/231767/…
 
7:33 AM
Hi everyone,
 
how uncomfortable do I feel when people realize from comments to other posts that I downvoted their post and start targetting me, then they do half-a$$'d fixes to their posts and pester me with cancellation.
 
I need a help, regarding ```TypeError: open() missing required argument 'file' (pos 1)```.
I have searched a lot but cant understand what I need to change in my code.

Please help me on this & Thanks in advance.
 
@Ozzius without your code we can only speculate, but it looks like you are trying open() when it should be open(filename)
 
8:03 AM
@tripleee it's not really against the rules to ask here first. But @AjayMishra has been using the room as a debugging and support service for various vague coding challenges, so I'm OK with reducing that
@Ozzius in your searches did you encounter the documentation for open?
 
cbg
 
@TheNamesAlc you meant generator expressions. Generators are a broader term, and they are essentially functions with internal state the execution of which you can suspend then resume
 
@AndrasDeak Yes, I have tried previously, But its better if we start discuss, so it will be helpful for others too along with me. Thats Why Im trying to do it.
Please consider my code below.
import tkinter as tk
from tkinter import *
from tkinter import ttk, filedialog

root = tk.Tk()


#t = threading.Thread(target=open__file)

class TextLineNumbers(tk.Canvas):
def __init__(self, *args, **kwargs):
tk.Canvas.__init__(self, *args, **kwargs)
self.textwidget = None

def attach(self, text_widget):
self.textwidget = text_widget

def redraw(self, *args):
'''redraw line numbers'''
self.delete("all")

i = self.textwidget.index("@0,0")
while True :
dline= self.textwidget.dlineinfo(i)
 
def open(self, file=None):
print('Open an existing file from the system.')
# return 'EOF'
file = filedialog.askopenfile(title='Select a file')
if file != None:
with open(file, mode='rb') as contents:
You shadowed built-in open
 
@AnttiHaapala I worry about that all the time, that someone is going to target me for comment on bad posts.
like what could you even do about it
 
8:07 AM
@tripleee Please review my code above.
 
@Ozzius pleasse see sopython.com/wiki/… and practice in the sandbox if necessary
 
@StephanS Suck it up and be proud of the fact that you voiced your concerns even though it put you at risk of childish retaliation
 
that's fair
 
@StephanS in this case I did not even comment on that post but downvoted as I went through the posts
 
@Ozzius you got an answer already, didn't you?
 
8:15 AM
I put a comment under the question
 
@AndrasDeak @Ozzius this one that I am replying to
 
@Ozzius actually, I'm not 100% sure that's the issue so you should 1. remove a lot of fluff from your code while keeping the error, 2. format your code properly in chat or post it to a code paste site, 3. add the full traceback of your now-MCVE
 
 
1 hour later…
9:33 AM
cbg
 
Sir, still same issue happening, while I'm executing.
Thanks in advanced.
 
can you please provide an MCVE? the code you currently have is very long (x7 scroll bar) and badly formatted
 
cbg
 
did you perhaps intend for filemanu.add_command(label='open', command=open) to be filemanu.add_command(label='open', command=self.open) ?
take note that Example.open does not look valid either -- filedialog.askopenfile already returns an opened fiel, so with open(file, ... will fail because it needs a path or file descriptor. there is also no point to calling file.close() if you already manage file in a context (this won't fail, it is just a waste).
since you (@Ozzius) already have a print statement in Example.open, it would help if you would let us know if that output is actually visible - meaning whether your code actually enters your method or not.
 
9:52 AM
@Ozzius I could only repeat myself if you ask me for help
@MisterMiyagi it would also help to let me teach them to read instructions and at least try putting together something resembling an MCVE
 
Yes, Sir, Please find my updated & cleaned code snippet.
def open(self, file=None):
    print('Open an existing file from the system.')
    file = filedialog.askopenfile(title='Select a file')
    if file != None:
        with open(file, mode='rb') as contents:
            self.text.insert(END, contents, END + '-1c')
 
that's not complete because def open(self, file) suggests that this is inside a class definition which will definitely matter
 
:47346998Yes, sir, I'm providing you the whole code & output details.
 
you don't have to call us "sir", we're all peers here
 
10:09 AM
@Ozzius I'll put it in super simple terms: We need a piece of code that we can execute and get the same error that you want to fix. The shorter this code is, the better. If your code is not formatted, we can't help.you. If you only format one function and not the rest of the code, we still can't help you.
 
and we've yet to get an actual complete error for a given iteration of the code
 
Please find below code, I have removed all unnecessary code blocks & only keep associated blocks
 
@Ozzius please review code formatting
 
2 hours ago, by Andras Deak
@Ozzius pleasse see https://sopython.com/wiki/An_Illustrated_Guide_To_Formatting_Code_In_Chat and practice in the sandbox if necessary
ehm
2 hours ago, by Andras Deak
@Ozzius actually, I'm not 100% sure that's the issue so you should 1. remove a lot of fluff from your code while keeping the error, 2. format your code properly in chat or post it to a code paste site, 3. add the full traceback of your now-MCVE
something tells me there's diminishing returns on asking for formatted code
 
10:16 AM
something i should mention, i just opened the formatting code guide
 
anyway, the long and the short of it is that you can't call your method open if you also need the regular open function
 
looks like all the image links are blocked by my network
 
the images illustrate what the text says but you should be able to make sense of it without the images, too
 
Aye, the text is fine
 
@tripleee I'm wondering though, wouldn't you need self.open to access the instance method?
 
10:18 AM
But just thought i'd bring it up
 
@ParitoshSingh all of imgur is blocked then?
 
oddly enough, i can open imgur.com
 
@AndrasDeak hmmmm, true
 
So im not quite sure what's the deal
 
@tripleee that's why I was asking for an MCVE
 
10:19 AM
Let's all agree to wait for a MCVE
 
The images are fine for you guys right?
 
@ParitoshSingh yes, e.g. i.imgur.com/4IeiKzF.gif
 
Weird, i can open that link directly without issues too
 
Unless somehow js is blocked which breaks your click. You did click, right?
 
cabbage
 
10:20 AM
yep, clicked it, got a broken image symbol with the name
 
Anyone named Antti is my hero today!
 
@ParitoshSingh huh, weird
 
I dont think i have a script which disables js, but then i guess it isn't my office network blocking it.
 
Perhaps the trick used by the guys simply doesn't work with your weird browser. It's not Edge, is it?
 
hehe, fortunately no. we use chrome at work
 
10:22 AM
oddly enough, the urls are relative to the protocol for some reason: src="//i.imgur.com/4IeiKzF.gif"
 
(even though i'd love to use firefox) :(
 
@Kevin any idea? --------------------------------------^
 
my js console is filled with 7-8 messages of blocked by client. but then the direct link should fail too right?
actually, let me flush the cache and try again
 
depends. Do you have any content blocking addons? UMatrix or whatever?
 
Hm. not that im aware of. I use adblock (shh dont tell my company)
But other than that, nothing
ok, flushing the cache fixed it
i think i can figure out what's going on. or atleast i have a theory now
eureka
imgur is blocked on my office network, but not on my vpn access
nothing to see here, crisis averted.
(except it seems like the IT policies don't seem to be updated on the vpn network.)
 
10:42 AM
@tripleee one can name a method like a builtin, and judging from the initial code the problem is that open is used when self.open it should be
 
ah, good catch
 
@Aran-Fey how's that odd
 
for future reference: i.stack.imgur.com/Ll6sb.jpg
 
@AnttiHaapala well, why not just use https?
 
well bc https is more expensive, and if you were browsing http already then just by all means continue using it! You're fd anw.
 
10:53 AM
hmm, makes sense I guess
 
Sam
11:11 AM
Back with another Keras question for the wizards. I've defines a custom `Lambda` layer to perform a derivative of max pooling which relies on splitting convolved feature maps into segments (along some axis) and calculate the max value on these segments. I'm having a hard time trying to understand batches during these operations.

My `Lambda` layer points to this function:
def dynamic_pooling(tensor_list: tuple):
    tensor, trig_idx = tensor_list
`tensor = (batch_size, 18, 200)` dim tensor and `trig_idx = (batch_size, 1)` tensor.

For each batch sample, I need to split the tensor by an index given in `trig_idx`.. It seems I cant use `tf.split(tensor, [trig_idx], axis=1)` as tensorflow doesn't like the second argument to be anything but a list. I was wondering how one would account for batches in this case as each data sample has it's own split value
 
11:59 AM
Hmm, it bothers me that PIL can read from the clipboard but not write to it.
 
clipboards are weird
 
I wanted to write a little command line tool that would draw a grid of rectangles and put it in the clipboard. I often need grids when I'm composing problem visualizations in MS Paint, and making a grid from the ground-up every time is a pain.
 
there are dedicated clipboard meddling modules out there, but I'm sure you know that
 
I could make the tool save the grid to a file, but then I'd have to open an explorer window, open the file using paint, copy the grid, close paint, delete the file, close the explorer window, and paste the grid into my real paint window
 
can't pyperclip somehow copy the bytes from pil?
 
12:05 PM
The first two libraries I looked at, pyperclip and clipboard, appear to only copy text.
And if I converted the PIL image to a bytes and copied it, I don't think Paint would recognize that it's image data. IIRC Windows has like ten different clipboards for different kinds of data. Paint is looking in the bitmap clipboard, not the text clipboard.
 
this seems worth trying
 
for what it's worth copy-pasting images is an abomination
 
Microsoft, please incorporate Python scripting support into Paint so I can draw grids without making scary dll calls
 
Microsoft replies: you're using paint? the heck is wrong with you
 
12:22 PM
Free, fast startup sequence, good: choose two.
 
I choose notepad++.
 
If I never have to sit through another 90 seconds of "please wait while GIMP loads thirty more extensions you never use...", it will be too soon
 
(Probably the only exception to that rule) :P
 
I have a fancy new gimp with my new debian. It has this quirk that whenever open any image with it it crashes.
I guess I should investigate that sooner or later
 
a crash, on debian? I thought that was supposed to be reliable
 
12:27 PM
It is, and so is gimp. Something's off with it, I probably have to reinstall.
although I'm on debian testing rather than stable, which could be more crashy, but it hasn't been like that at all so far
 
@Aran-Fey If it crashes 100% of the time, that's very reliable.
 
heh
to be fair I've only tried that it crashes if I take a screenshot or open an existing image on my computer
and it gives me a huge traceback with my crash which is much more than what most crashing software can say about themselves
 
Success. Props to Aran-Fey for the clipboard link
Now to wait for a problem to come along where I need to use this.
 
@AndrasDeak the trackback isn't just "OOOPS!" repeated a million times is it? :p
 
let's hope not ;)
 
12:38 PM
 
not obscure at all ;)
 
@Kevin omg... I remember playing that... can't believe it was 1990...
 
It's not often you see a commercial product that owns up to using try: main(); except: pass
 
Windows?
 
The "something went wrong. Search the Internet for solutions?" system message box does certainly seem to just pass... Or perhaps time.sleep(30)
I have my suspicions about the "gathering diagnostic data of the crash..." message on bluescreens, as well
 
1:29 PM
I had a request to include the related hyperlinks to the pyparsing wiki in some of the new "you're doing it wrong" diagnostic messages.
 
@AndrasDeak why vague?
 
"I have a problem here is a link to my code" is pretty vague
you didn't even say what the code was supposed to do, least of all how it failed to do so.
 
I told that later, I told that it was a rail fence cipher.
Okay, I won't defend myself.
but what is vague in the coding challenges?
 
as someone occasionally looking into this room, I have absolutely no idea that you somehow somewhen mentioned which coding challenge that might refer to.
just because a problem description exists somewhere on the internet does not make it obvious here.
 
"I am getting the wrong output" is more vague then "when I run this code with input X, I get output Y, when I expect to get output Z"
 
1:38 PM
Okay. I just can't figure out whether the vague description is depreciated or the act of asking is depreciated.
 
the vague description.
 
Okay. :)
 
@PaulMcG if a more thorough, semi-official documentation exists I find links to it rather helpful I must say.
 
The ideal question is one that requires no follow-up reqeusts for clarification. If I can read your problem description and completely understand it and give an answer with no intervening communication between us, then maximum clarity has been achieved. If I have to ask "what error are you getting?" or "how do you know the output is wrong?" or "what are you actually trying to achieve?" or "is this your entire code?", etc, then maximum clarity has not been achieved.
 
> Ideal question
I'd like to add that the average internet user (and brain in general) can only hold a maximum of 8 pieces of information at the same time. So if your question has 5 lines of code and a description of input, faulty output, and expected output, you're already toeing the line of "will be ignored".
 
1:46 PM
... Which is not to say that a question is bad necessarily, if it requires discussion. Many questions fall short of this ideal, and we answer them anyway. You don't need to achieve perfection, but I would like you to aim for it
 
Okay, do you know about the resources where I can learn some problem-solving skills which can lead me to solve the programming problem efficiently? As an example, there is a site named codewars(just like codechef but problems are generally harder( after 4kyu level) and the coding environment is more friendly), after solving a problem I see some people solution are like 5-6 lines, which I barely understand, and for the same problem, I have to think for almost a day and I come with code 40-50 li
nes.
 
An earnest attempt is worth a whole lot
 
Is this skill is learned or just come through practice?
 
practice, mostly
and not solving coding challenges but real problems
 
By real problem do you mean math problem or life problems?
 
1:49 PM
I mean problems that do not end up in the trash, but are still needed 2 or 4 weeks down the line
if you write code only for throwaway problems, you miss that feeling of looking at your code again later and thinking "what the f* was I thinking?!?"
collaborations builds your coding quality immensely, and the easiest collaboration is with your future self
 
hear hear
 
That is relative, I solved a problem just today morning and I can hardly read what I have written even for the problem of simple cipher algorithm implementation.
@Arne Indian English. ;)
 
Writing code in a way that makes it easy to understand later is also a skill that improves with practice
 
@AjayMishra then you may want to practice on collaborating with 1-hour-future self already, before you move on to tomorrow-future self
next-week-future self is generally the first mini-boss
 
Sometimes I do not even how to start for the practice, as an example:
Kata Task

You are given a grid, which always includes exactly two end-points indicated by X

You simply need to return true/false if you can detect a one and only one "valid" line joining those points.

A line can have the following characters :

- = left / right
| = up / down
+ = corner

Rules for valid lines

The most basic kind of valid line is when the end-points are already adjacent

X
X

XX

The corner character (+) must be used for all corners (but only for corners).
It must be possible to follow the line with no ambiguity (lookahead of just one step).
I have just no idea how to approach this problem.
I know python but this problem is just too hard for me, as it seems.
I have solved almost all the problem which were level below than this.
 
1:55 PM
are you familiar with graph traversal algorithms?
 
"Sometimes a line may be valid in one direction but not the other". What. That doesn't sound possible to me.
 
No, tha's what I am asking where to learn these? Please don't tell me just google the name because I do not know that such things even exists.
 
I recommend pen and paper instead of jumping straight to code. if you do not know how to start at all, you are facing an algorithmic problem, not a coding one.
 
I thought that might have been the case. Start by reading up on depth first search
 
@Kevin it may refer to that lookahead condition. but yeah, it's a pretty bad description.
 
1:58 PM
@MisterMiyagi I just copied and pasted, If it is still vague, it's not my fault.
 
There was a question kind of like this one in last year's Advent of Code. Except it used slashes and backslashes instead of "+" to designate corners, which is much less ambiguous
 
@AjayMishra that's not your fault. but you may want to consider solving better-defined problems -- this will mostly teach you how to understand badly phrased problems, not solving them.
 
just-survived-an-os-dwongrade-cbg, it turns out that with "bleeding edge" it is you who bleeds, not the edge ;)
 
@inspectorG4dget Is this relevant or you saying me to start from the beginning as that algorithm was given in the beginning of the book on Artificial Intelligence by Stuart and Russell.
 
Which direction should you follow here? Who knows?
     |
     |
X----+
     |
     |



Ah, I should take the downwards branch, because that's what the backslash indicates.
     |
     |
X----\
     |
     |
 
2:00 PM
@AjayMishra based on my rudimentary understanding of the problme you face, a DFS is at least somewhat relevant to the solution
 
That AOC problem is where I am currently stuck, actually. I have no idea how to update the movement and predict the collisions from a list of strings that represent the rows of an ASCII image that depicts carts on a track. I could come up with something super hacky but am waiting until a graceful solution magically pops into my head.
 
b = 9874
print(round(float(b) * 2.26693086, 2))

# how to switch output from 22383.68 to 22,383.68
something about split string in specific place.
 
Python has locale aware number formatting as well, if that is what you actually want.
 
string.format definitely has a thousands separator specifier, although I forget its exact syntax
I assume the same is true for F strings
 
f"{format(myBigNumber, ',')}" would work
 
2:09 PM
>>> b = 9874
>>> x = round(b * 2.26693086, 2)
>>> "{:,}".format(x)
'22,383.68'
>>> f"{x:,}"
'22,383.68'
 
@inspectorG4dget you can drop the outer format string if only the number must be formatted
 
@MisterMiyagi cool beans. I learned something new today :)
 
>>> format(1241224.312, ',')
'1,241,224.312'
 
I was going to say "instead of using round to truncate your data to two decimal places, try using the format specifier to do that instead", but I can never remember how to actually do that
>>> x
22383.67531164
>>> f"{x:2,}"
'22,383.67531164'
>>> f"{x:,.2}"
'2.2e+04'
 
print(format(round(22348.18 * 2.26693086, 2)), ',') # printing 50661.78 ,
 
2:15 PM
Ah, needs an explicit type specifier apparently
>>> f"{x:,.2f}"
'22,383.68'
@αԋɱҽԃαмєяιcαη You made "," an argument of print rather than format. Try print(format(round(22348.18 * 2.26693086, 2), ','))
 
has anyone here implemented any machine learning models in a production environment? I'm wondering how large models (that take a lot of time to load into memory) are handled
 
you mean implemented as in "coded from scratch" or as in "used"?
 
used
 
pickle files
 
super :) @Kevin thanks bro
 
2:18 PM
used in a web service
 
can you clarify your question? if they take a lot of time to load, then you have to wait until they are loaded.
 
I recommend using f strings instead of a format() call, since it's a lot harder to get the parentheses wrong since there aren't any
 
sorry - ok what I mean if you were to expose the model in a webservice it would take forever to make each request if you had to laod the model each time a request came in - so what I'm doing is I create a singleton instance of the model and there is only one process that can be access by the web service
 
you seem be looking for a cache.
and I am decently sure your problem is not about machine learning at all -- that is just your specific use-case
 
yes its about handling the requests
 
2:21 PM
Loading the model exactly once when the server boots up, and then keeping it loaded for as long as possible, seems like a good way to avoid loading times
 
Python already ships with some caching solutions, e.g. docs.python.org/3/library/functools.html#functools.lru_cache
 
because currently I'm using pyinstaller to package the python code into a windows executable which I'm using in a singleton class in my asp.net web api
what does caching help solve? in this particular case
 
loading/creating the data fewer times
ideally only once
 
in order to bypass captcha, how can i know the version of the captcha which am dealing with it ?
 
If you're unsure of that, I'm not sure if you should be thinking of bypassing it in the first place.
 
2:28 PM
@shad0w_wa1k3r am just learning to calling the web via Python requests. trying to login to website with captcha. after reading some resources online. i do see there's kind of versions for captcha 1,2 and 3.
 
Presumably a website will typically be consistent about which version they use. In other words, it's not likely that they'll use version 3 on one page load, and switch to version 2 on the next. So you should be able to tell what version the website uses by looking at it in a regular web browser
If you're trying to write a generic captcha solver that works on any website with no prior information about what captcha it uses... That's pretty dang ambitious
 
i understood that point.
@shad0w_wa1k3r 3ash ya sa7bi :)
 
I expect that captcha systems will intentionally not give any information about themselves in the page source, precisely for the purpose of making the captcha harder to detect and automate. So when I say "look at it in a regular browser', I don't mean "use the element inspector to see if there's any data in the html", I mean "use your eyes to see whether it's a 'find all the parking meters in these images' captcha, or a 'type out this distorted character sequence' captcha, or whatever"
Automating that would probably require some PHD-level image recognition algorithms. That stuff is way beyond me, personally
 
@Kevin thanks a lot for this clarification
 
2:42 PM
me: innocent intentions but seemingly snarky short remark
kevin: elaborate explanation in Kevin style
PM: a picture is worth a 1000 words...
 
If it's worth saying, it's worth saying three times with wildly different presentation styles
 
:D mashy ya m3lemy :P
 
If everybody skips over my walls of text without reading them and assumes it just says "I agree with the last message, and here's another 500 characters to prove my commitment/sincerity", then they'll be right 90% of the time
 
2:46 PM
@Kevin i like the way how you explain the info. i really appreciate it
 
@BlackThunder closed
 
@shad0w_wa1k3r Thanks :)
 
@BlackThunder is file = open("doc.txt") a valid CMD command?
 
^ reason for close should've been "too broad"
 
2:53 PM
@MisterMiyagi Its a python command.
 
@BlackThunder that wasn't my question
 
@MisterMiyagi he trying to open the file without typing it's will be for reading or writing ...
 
Lettuce
How did that answer get there after in 30 sec, while the question is closed 3 min ago? stackoverflow.com/a/58013787/8321664
 
cbg = cannabigerol
 
@BlackThunder likely because the answer was being edited / typed before closure
 
2:55 PM
@αԋɱҽԃαмєяιcαη the default is reading.
 
btw is having 300 columns in a database table bad?
 
cbg
 
gdc
 
2:56 PM
what's the meaning of cbg or cbd which you keep posting all ?
 
hello
 
@erotavlas I would say so.
 
that's new language :D
 
2:57 PM
its the cannabinoid language
 
hhahaha
Melon
Laurel
 
what, this is something real lol
 
yea Laurel = LoL
any good resource to learn Python requests in good way ?
 
@αԋɱҽԃαмєяιcαη Their official quickstart documentation is nice
 
@erotavlas rot13("cbg") == "pot"
 
3:07 PM
:) avocado
 
does anyone know a library to make context managers thread/coroutine safe? so that one can do with foo: instead of having to do with foo.context but still use thread/coroutine-specific state?
 
I don't understand what you mean by making a context manager thread/coroutine safe. Could you write a small example?
 
Does anybody else have issues with chat?
I can't seem to be able to reply to a specific message. But this ^ undirected one went through
HA, directed pings aren't working
 
Yesterday I couldn't reply to a message that Holden wrote. Or was that on Tuesday? Whichever.
 
3:18 PM
nope, no problems at all
 
I'm getting an unknow error
 
"Oops! Something Bad Happened!"
Thank you for playing Wing Commander
 
"-An unknown error has occurred - retry/edit/cancel"
 
haha, no pings work at all, so I can't ping Shog in chat
 
3:23 PM
Me: I wish the devs would start working on chat again.
Monkey's paw: <one finger curls up>
 
I mean what would they work on?
 
well it's like acupuncture apparently, and they hit a nerve
 
I'd like the search bar to have a "said by: me" option, to pick a random example
 
@davidism That question is now deleted.
 
@Aran-Fey not that easily it turns out ^^ I'm trying to have a __context__ method analogous to __iter__, basically
 
3:25 PM
hey, two pings!
 
which was part of the with PEP but rejected because no one could explain it properly... python.org/dev/peps/pep-0343/#rejected-options
 
@AndrasDeak I missed this so much
 
@PM2Ring I received your ping :-)
 
I tried using a directed reply, but got caught in a retry/edit/cancel loop. And it took 2 tries to post the undirected reply.
 
@MisterMiyagi Ah, well, in that case you don't need to write an example because there's a 0% chance of me being able to help you
 
3:26 PM
@AjayMishra definitely the former, but even asking well all the time can also get tiresome. This is a chat where people come to talk, primarily.
 
Apr 17 at 9:33, by PM 2Ring
Besides, some people consider it cheating to get any help with contest code. We're not that strict, but at the same time we want your rank on the contest sites to reflect your coding skills, not ours. ;)
 
I'm not sure how __context__() differs from the __enter__ and __exit__ dunders we've got now. Assuming "analogous to __iter__" means "allows you to seamlessly use arbitrary objects in a with statement, provided you've defined the right dunders"
If you implement __iter__, then you can do for x in my_object:. If you implement __enter__ and __exit__, then you can do with my_object as x:. Thus ends the analogy.
 
@ReblochonMasque Did I ever answer this? In case not, I'm fine thanks. Just finished my first week in the new job!
 
I need to set up new state every time I __enter__ and clean up only that respective state every time I __exit__
I can do that with a thread/coroutine local stack but that gets really tiresome
the underlying problem is that __enter__ does not know which __exit__ belongs to it
 
3:32 PM
I don't suppose Reentrant context managers has any useful insight?
 
cbg, is asking recommendation(related to python) on topic here?
 
@MisterMiyagi Can you do something with ExitStack? docs.python.org/3/library/contextlib.html#contextlib.ExitStack
 
I was going to say "surely you can tell which __exit__ belongs to which __enter__, because the first __exit__ that fires belongs to the last __enter__ that fired", but I guess that's only true for single-threaded code.
And maybe not even then, if you get fancy with yield
 
I've never actually used ExitStack, but I figured it was worth mentioning. OTOH, I assume you've already combed through those docs. :)
 
Good to know @holdenweb, thank you!'
 
3:36 PM
@αԋɱҽԃαмєяιcαη stick to English, please
 
@Kevin context managers and yield are broken beyond repair, I am afraid
trio found that out the hard way
 
Or Salad
 
@PM2Ring that's close to what I need, yes, but I don't want users to explicitly conjure a stack every time
 
@Kevin like the one in your profile?
 
Yeah, except I want it on the search page.
 
3:39 PM
@anky_91 Sure. Although we do expect you to do some prior research, and to give us some clear, focused requirements.
@MisterMiyagi Fair enough, although "Explicit is better than implicit".
 
i feel like eating lunch but its not lunch time yet
 
Second breakfast
 
@PM2Ring since explicit in this case is async magic -- I'd like to avoid that
 
@PM2Ring thanks
Suppose few users(stakeholders) has to share a file with me in a platform and I have a python script (I should be able to save .py files in the platform) which will do some data transformations and provide the transformed data to them back as a file. My question is what should I look at, eg: I was looking at pythonanywhere , but it doesnot apparently have a shared folder system, any suggestions for platforms for this usecase? Where should I start.. no idea actually
 
I think the answer you don't want to hear is "no, there isn't a library that automates the tedious work of setting up thread-specific reentrant manager stacks. But since you've already got something half-working, maybe you could spearhead that for all of us, thanks in advance :-)"
 
3:43 PM
I'm already crawling pypi for some nice, unused names... :D
 
are you going to resell them?
 
Hammered
 
00:00 - 16:0016:00 - 00:00

« first day (3260 days earlier)      last day (1689 days later) »