« first day (3267 days earlier)      last day (1696 days later) » 
00:00 - 14:0014:00 - 00:00

2:02 PM
@Kevin Perhaps he means like a text crawl, like you would see at the bottom of a sports or news program.
 
Googling yielded no results. Guess I'll post a question and earn 5 rep with it
 
No, AFAIK, it is unsafe to run any tk commands outside the main thread where the mainloop must reside
 
My poorly informed guess is "not guaranteed to work by the spec, but probably does work anyway"
Maybe root.after does nothing but append a (function, timeout) tuple to a pending_timed_events list. Since append is thread-safe, maybe we're good
A related question is "can a function object created by thread A be safely called by thread B, even if the function body refers to nonlocal and/or global objects created in thread B?"
 
user10984358
heya guys, are these two the same? if so what is the purpose of all and any?
 
user10984358
if any(all([hashedCommand in commandsExecuted,refresh]),[hashedCommand not in commandsExecuted]):
if any([hashedCommand in commandsExecuted and refresh],[hashedCommand not in commandsExecuted]):
 
user10984358
2:11 PM
it just takes the place of chaining 'and's and 'or's
 
I'm surprised that the second one works. I thought any accepts only one argument.
 
user10984358
it doesnt? i just typed it out, i was pondering which to use
 
>>> any([x for x in range(10)], [y for y in range(20)])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: any() takes exactly one argument (2 given)
 
What is refresh?
 
user10984358
its just a argument in the function
 
2:13 PM
What function?
 
win_read is not returning the values to display! @Rozakos
 
user10984358
i have this function that executes a subprocess, and based on this refresh (bool) i have to decide and hence the weird if construct
 
In general I'd say that passing a list literal to any, for example any([x,y,z]), is an antipattern. You may as well just do x or y or z
 
Whatever you're trying to do, I don't follow it
 
quote = win_read is very suspiscious too !
 
2:15 PM
any([x,y,z]) is less readable (to me) and slower, since it doesn't have the short-circuiting behavior that or has.
 
user10984358
so i will go with and's and or's then
 
Short-circuiting might even be necessary in order to avoid a crash, for example:
>>> seq = [1,2,42]
>>> len(seq) >= 3 and seq[2] == 42
True
>>> all([len(seq) >= 3, seq[2] == 42])
True
>>>
>>> seq = []
>>> len(seq) >= 3 and seq[2] == 42
False
>>> all([len(seq) >= 3, seq[2] == 42])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
IndexError: list index out of range
 
user10984358
there was a [] missing in both cases, my bad
 
user10984358
what is short circuiting behavior? first time hearing that
 
user10984358
ok i get it
 
user10984358
2:19 PM
stop if first is True in case of and
 
Right. And "stop if first is False" in case of or
Or, strike that, reverse it
 
I still don't follow "if any([hashedCommand in commandsExecuted and refresh],[hashedCommand not in commandsExecuted]):" before going on to short-circuiting
 
Stop if first is false in case of and. Stop if first is true in case of or
 
user10984358
so there is a cache like behavior i have, since i am asked to implement that
 
Oh, by the way, hashedCommand in commandsExecuted and refresh is not equivalent to "hashedCommand is present in both of commandsExecuted and refresh". It's equivalent to "hashedComand is present in commandsExecuted, and the list refresh is not empty"
 
2:22 PM
But refresh can't be a function, which you told me it was, it's the result of a function call?
 
user10984358
hashedCommand is whatever command i want to run in the subprocess, but that command should only be run if the hashedCommand is not seen before or if refresh is set to true
 
Otherwise that is always going to be True
 
@TheNamesAlc Your job sounds like a code challenge site
 
Ah, if refresh is a bool, then your logic is probably fine as-is
 
user10984358
@roganjosh i said its an argument in a function
 
2:23 PM
Right, and what function is that?
 
"assuming that x in y and z is equivalent to (x in y) and (x in z)" is a very common antipattern so it takes me by surprise when the author really does intend for it to mean (x in y) and z
 
user10984358
its the function the user is expected to call, wdym by what function? you want the behavior or i am sorry i dont get that
 
Perhaps there is a communication issue here. When you said "based on this refresh (bool)", that could be interpreted as "based on the result of the expression refresh(bool), i.e. calling the function refresh with the argument bool", but I think you meant "based on the value of the boolean object refresh"
 
and refresh doesn't call any function. It's just sitting in a list.
 
@roganjosh the enclosing function that does this check inside
 
user10984358
2:26 PM
what Kevin and Andras say is what i am doing
 
user10984358
so when some one does getDevice(flags,refresh=True), this whole check comes in
 
I'm happy to accept that it's my failing here but I really don't see what I'm missing
The only function call is any()?
 
user10984358
i should have phrased it better to avoid ambiguity, its kinda difficult to express something to someone when you have some notions that you assume arent needed beforehand
 
@roganjosh just miscommunication, we've already discussed today that English is not their first language
 
user10984358
if i give the user the code, he just calls getDevice that is the only thing that is accessible, all that i am asking here is what goes inside my getDevice function
 
2:30 PM
that being said, TheNamesAlc has been asking here for a long time about back-to-back programming problems, so I want to remind everyone to only be involved as long as they think they don't have anything better to do
 
root.after(...) returns an id that you can use to cancel the call:
callback_id = root.after(...)
...
root.after_cancel(callback_id)
I don't think you could do that if it was in a different thread?
 
user10984358
well anyways thanks for the inputs, appreciate that, thank you
 
I mean, it's OK as long as people are willing to entertain your problems. I just want to remind everyone that nobody should feel obliged to help.
 
FWIW I don't think I've had miscommunication problems (in the sense of language barriers) with TheNamesAlc before. But I don't think I'm being helpful in this particular problem so I'll back out
 
Knowing what details are important when conveying a problem, is an acquired skill
 
user10984358
2:33 PM
well the past couple times all i asked was about homework and stuff so didnt really care about what to tell and what, being a job oriented task i just dont know what to divulge and what not
 
user10984358
that could be the reason for this whole miscommunication
 
Considering your NDA that's only something you can know. But note that SO chat is fully public for all eternity
 
Usually the required details are "whatever is present in your MCVE" but advanced querents can get away with less
 
user10984358
that's why i try to give bare minimum and that doesnt seem to be working fine
 
advanced usually means "lucky enough to meet Kevin first"
 
2:35 PM
You can negotiate with your supervisor
 
@TheNamesAlc Yeah, bare minimum is too minimal. It has to be C for complete.
 
user10984358
he is working from home apparently, wow
 
For example asking "hey, how do I transpose a list of lists?" instead of "how do I turn [[1,2],[3,4]] into [[1,3],[2,4]]?". But you've got to be real confident that the listener knows what "transpose" means
 
And you don't have to give us a single line from the company code base. The same problem can typically be modelled with dummy variable names and stripped-down code structure
 
I signed my soul away and had to play all sorts of games with jsprit, but there was still an interest in getting things done
 
2:37 PM
I'd be surprised if vehicle routing was detached from "getting things done" ;)
well not too surprised, because I've heard enough about corporate life
 
The stories I could tell... oh wait
 
user10984358
i must learn to do it that way, i am the only person at the 20 people surrounding me who knows python the rest are perl monks, so i dont really have much to ask at work place
 
at least you know whom to ask about regex
 
@TheNamesAlc You can seek clarification on what you can and can not do in terms of SO
 
user10984358
i was asked to convert a defaultdict to json just so the defaultdict(<function>) would go
 
user10984358
2:39 PM
so you assume the level of python literacy around me
 
@TheNamesAlc you had me at "convert to json"
oh, they meant actual json (string), nevermind
 
user10984358
no not as file or anything, just to remove that
 
user10984358
i had to explain for a couple minutes that it was just there and it wont affect
 
That doesn't break your NDA. If you think that you need clarification from elsewhere, you need to get assurance on what you can and cannot say. But you can't be completely stuck... it's also frustrating for people trying to help you
 
for what it's worth the defaultdict repr can get spooky for those unfamiliar with it
 
user10984358
2:41 PM
i am sorry for what i did, i will try to tone it down, both asking here and better phrasing
 
you didn't do anything wrong
 
I wasn't asking for an apology anyway, I'm just suggesting that you can get that clarification
 
user10984358
good to know :)
 
user10984358
i am off to dinner i guess, thank you, see ya
 
Take care, rbrb
 
2:44 PM
see you
 
Python devs, please implement functionality like with defaultdict.display_nicely(): print(my_defaultdict) that removes all the crufty bits from the output
 
more characters than print(dict(my_defaultdict))
 
That's a cromulent approach if the defaultdict does not contain more defaultdicts inside it
 
it better not
 
 
1 hour later…
3:49 PM
Bah, this js works if I execute it on a blank page, but not when I'm on this page
This better not be a doctype issue or something
 
4:04 PM
Now it's broken on both pages. This pleases me.
 
definite improvement
 
That which can be replicated can be debugged
 
Oh, i really like that line. I think im going to use it
 
Ok, it's functional. Positioning is wonky as hell, but it's good enough for a beta 🐍
 
inform the radical badger @wim ^
 
4:15 PM
I was going to recommend using multi-line strings, but after reading stackoverflow.com/questions/805107/… I've lost all hope for JS
"Some browsers insert newlines, others don't"
 
fun fun
 
Things that need to be done, which I don't know how to do:
- put toggle button in top-right corner of the input box
- align bottom of pop-up with top of toggle button
- nice round corners for pop-up
- stretch tab icons' x-padding so they're evenly spread out along the top
- make the box large enough so it doesn't resize when you change tabs
- add emojis to all the tabs that are currently empty
- dismiss popup when user clicks anywhere else on the page
 
you can do those in the next round of VC funding
 
Yeah
@Aran-Fey If Chrome and FF support them, maybe I should check out multiline strings. I abandoned support for IE five minutes into the project, when I discovered for(var x of y) wasn't available.
 
By the way, I'd recommend re-using existing CSS classes whenever possible - if you add the wmd-prompt-dialog class to the pickerBox, it looks good on a dark theme as well
(that's the same class the image upload dialog uses)
<span class="emojiPicker"></textarea> <- that looks b0rked
 
4:33 PM
cbg
what is the best way to multiply a 2D array and a 1 D array of different size
example:
np.array([[1, 0, 1, 0, 0],
       [1, 0, 0, 1, 0],
       [1, 0, 0, 0, 1],
       [0, 1, 1, 0, 0],
       [0, 1, 0, 1, 0]])
lets assume this array
 
define "different size"
the answer is either "broadcasting" or "matmul" or "you can't"
 
and np.array([10,20]) this is the second one
 
OK. Define "multiply".
do you want to end up with a 3d array?
 
@AndrasDeak no 1 min, typing :P
 
chop chop
 
(but really, it helps if you prepare a coherent question first)
 
sorry, i understand, surely next time
i want to end up with an array where I can populate the 2 1's in the array with both the second array values
 
you mean for each row the first 1 should be replaced with 10 and the second one with 20?
 
like this
[[10,0,20,0,0],
 [10,0,0,20,0],
...]
:)
@AndrasDeak right
sorry again
 
And I take it it's guaranteed that you'll only have exactly as many ones as the size of the 1d array?
 
4:41 PM
i will prepare the full question next time :)
 
Whoops, I just noticed I accidentally placed the document.addEventListener('click', close_picker_on_click, true); inside the loop
 
@AndrasDeak yes
i am thinking broadcasting
but couldnt crack it
 
bit ugly
>>> arr = np.array([[1, 0, 1, 0, 0],
...        [1, 0, 0, 1, 0],
...        [1, 0, 0, 0, 1],
...        [0, 1, 1, 0, 0],
...        [0, 1, 0, 1, 0]])
... vals = np.array([10, 20])
...
... arr[arr == 1] = np.tile(vals, arr.shape[0])

>>> arr
array([[10,  0, 20,  0,  0],
       [10,  0,  0, 20,  0],
       [10,  0,  0,  0, 20],
       [ 0, 10, 20,  0,  0],
       [ 0, 10,  0, 20,  0]])
arr[arr == 1] is guaranteed to go row-wise along the array, so you have to take values repatedly from vals. You might be able to put itertools.cycle(vals) on the right-hand side
 
is it actual multiplication though?
 
no, not multiplication at all
 
4:45 PM
or did you just think of multiplication as a Y to your XY problem @anky_91
 
but wouldn't matter
:)
 
It's possible it can be done with clean broadcasting assignment, making use of arr.nonzero(), but I think it would be more sweaty
I'd like it if we could get rid of the np.tile though
 
@ParitoshSingh may be :(
 
ah gotcha gotcha
 
i thought it would be easier to multiply 1s with the 2 elements in the array
apparently it is not
@AndrasDeak No it is cleaner than I thought
i forgot about tile as a usecase here
thanks
 
4:47 PM
no problem
 
4:59 PM
@Kevin I don't think it's possible to prevent the box from resizing with pure CSS... here's a proof of concept with some help from JS though
 
does anyone know how to get gunicorn to bind two different flask apps on two different endpoints? Losing my hair, here
 
I'm 99% sure I've had flask apps on port 5000 and 4999 at the same time
Using gunicorn. I don't think I understand your issue
 
actually, I have a slightly more challenging problem: I have my app running on :80 at / (POST). I also have a heartbeat running on :80 at /heartbeat (GET). Gunicorn does not seem to like this setup
 
Isn't that the job of something like NginX?
 
I guess I have to learn nginx now ^^
 
5:09 PM
I don't know how to do it when it comes to gunicorn (or what gunicorn is even), but this should be the responsibility of configuration files on whatever "Server" youre using
 
It's actually not too bad
@ParitoshSingh you don't know what gunicorn is? What is your Flask app deployment?
 
windows. so apache mod wsgi
im guessing gunicorn would be the modwsgi equivalent, and then nginx would be the apache equivalent
please correct me though, i'd like to know
 
I'm not sure I can tbh
You launch multiple workers on Gunicorn (they can be processes or threads)
 
@Kevin did you try prettyprint?
 
They listen on a particular, internal, port and you get NginX to redirect to those ports
But Gunicorn is literally as simple as it gets
 
5:14 PM
that makes me think gunicorn is the server here
 
@reydonsancho Nope
 
so gunicorn -w 5 --bind host:port file:app creates 5 clones of app as defined in file.py, which listens on port and lives on host. However, if I have two apps that live on the same host and listen on the same port, I don't know how to make gunicorn do that
 
Well, my question would be why you have 2 apps listening on the same port
 
wim
is that even possible?
 
5:17 PM
@roganjosh one does the actual computation (wlog, let's say it adds the numbers sent in the json request). The second is a heartbeat ("hey server! are you alive?"). It should be possible, because they're running on two endpoints
 
- Experience with Java, C, C++, Python, Ruby, Perl, or other languages that target the JVM
This is false right?
The other languages dont target the JVM (bar Java)
 
I think there are ways to launch as such, but I don't know who intercepts what
 
@Permian not necessarily. it's up to the "implementations" to dictate that.
I know for a fact python has an implementation that targets JVM
 
@inspectorG4dget it's not 2 endpoints if they're on the same port
 
wim
Jython does
 
5:18 PM
@ParitoshSingh why would a company care about this stuff?
 
That's the one
 
wim
but it's a dead project I tihnk
 
@Permian who said they would
 
@roganjosh eep! I thought it endpoint referred to / or /heartbeat
 
@ParitoshSingh its a bullet point from a job advert
 
5:19 PM
@inspectorG4dget I think you should be launching on 2 different ports
 
exactly. :P and it should be treated with the same amount of respect as all bullet points on job adverts :P
 
@roganjosh I would love to, but I'm bound by requirements. I'll ask if they can open us another port
 
I'm happy to give you my NginX cinfig file
Right, even on the same port, I think it should be possible
 
@roganjosh I would absolutely love it if you could
 
Give me a few mins, but I also needed Jon's help with SSL
 
5:21 PM
sounds good. I'll wait for you to ping me when you're ready
 
wim
@Kevin they are different. any returns a boolean. x or y returns an operand.
 
Unicode Emojis v2.0, aka "The Aran-Fey update"
- use multiline strings for style/html injections
- add wmd-prompt-dialog class to pickerbox
- remove stray textarea
- dismiss popup by clicking anywhere else on the page
 
@roganjosh many thanks. I'll start poking around into it now
 
That redirects everything to my server
But it can potentially direct requests to different servers. I'm still dubious about whether it can work with multiple servers on the same port, though
 
5:31 PM
@Kevin Noice. You even fixed a bug I just discovered. (The smiley button would open the picker but not close it)
 
I'm not confident I've fixed that on every platform, because I don't think its guaranteed that the toggler's onclick will always fire before the "click anywhere but" event
If "click anywhere but" runs first, it will hide the popup, and then toggler.onclick will run and toggle the popup back open
Or, hmm
No, never mind. The toggler is inside the picker element, so it doesn't trigger "click anywhere but" at all
 
If I understand JS's event handling correctly, the event listener in on_click_elsewhere will always run first because it's capturing (triggered in top-down order, as opposed to bubbling which is triggered bottom-up)
 
Makes sense
 
It's kind of wonky because one of the handlers is capturing but the other is bubbling
If they were both the same I'd be more sure of myself
 
My most wanted feature at this point is aligning the popup directly above the toggle button, but I think I won't be able to implement that unless I open my third eye, which lays bare the foundation of the CSS box model
 
5:49 PM
I'm confused why top: -100% and transform: translateY(-100%) do different things and neither work
ah, the translateY works except it's not accounting for the height of the button itself
 
wim
they look like android emojis :(
apple emojis are much nicer
 
and apparently bottom: 0 doesn't align it with the bottom of the button either...? Nothing makes sense here
 
@wim Stange. Every emoji in the popup is a regular old unicode character. If you're using Apple hardware, they should look like Apple emojis.
 
rbrb
 
maybe google chrome superseded all hardware icon displays
 
5:56 PM
top: 0; transform: translateY(-100%); gets pretty close
 
I find it unusual that the box is horizontally aligned with the right edge of the message textarea (give or take 10px). It's as if it's inheriting its position from the chat-buttons td instead of the emojipicker span.
 
aaahhh, that's it. The emojiPicker span may be the dialog's parent element, but CSS doesn't care about that - CSS cares about the containing block
> If the position property is absolute, the containing block is formed by the edge of the padding box of the nearest ancestor element that has a position value other than static (fixed, absolute, relative, or sticky).
 
Ok, makes sense
In any case I don't particularly mind whatever x alignment it uses, as long as it's all visible on the screen
@wim do you happen to remember what kind of emojis were available under the fruit / party popper / trophy / spaceship / paperclip / flag tabs?
 
6:24 PM
a-ha! I found a place to steal a toggle button style from. How's this look?
 
Ooh, round corners. Don't mind if I do.
 
@reydonsancho I did, although just vanilla pprint.pprint. I'm pretty sure ipython (which I use) uses something similar
 
They keep sneaking in because that's what Greasemonkey's editor uses for indentation
 
I didn't know JS did backticks
are those multiline strings?
 
Yes, they're multiline strings. It's newish.
 
6:34 PM
neat, thanks
 
Problem: when the tab section is wider than the emoticon listing section, then the black line separating the two of them doesn't reach the right edge of the box.
If I delete .emojiListing{border-top: 1px solid black;} and add .tabSelector{border-bottom: 1px solid black;}, then it reaches the edge for the "flag" and "A" categories, but it doesn't reach the edge for any of the others.
If I keep both .emojiListing{border-top: 1px solid black;} and .tabSelector{border-bottom: 1px solid black;}, then it always reaches the edge, but the line thickness abruptly changes from 2px to 1px halfway through
Why is it so hard to arrange elements in a grid ಥ_ಥ
 
Hi is there a way to check bitcoin private key with Python 3? If they exist save and if not delete him from list.
 
I'm not too familiar with bitcoin. What does it mean to "check" a private key?
 
I have some list with old private keys. Some is false. 2-3 are real. I made that to protect myself but lose another file where I wrote directions. That's a huge list. There is only 2-3 valid and 1.000.000 false
 
6:51 PM
Ok, easy. valid_keys = [key for key in all_keys if is_valid(key)]. Now you just have to write is_valid.
 
Kevin please give me 0.01% from your brain man. Thank you
 
Sam
hello, does anybody know what locations, encodings = get_face_embeddings_from_image(image_rgb) means? I am talking about the comma and/with locations, encodings = ...
I tried to search online, but I don't know what it's called so I did not come very far
 
get_face_embeddings_from_image appears to return a 2-tuple
 
get_face_embeddings_from_image(image_rgb) returns an object that has two elements. Maybe it's a list, or a tuple, or whatever. locations gets assigned to the first element, and encodings gets assigned to the second.
 
Sam
And, correct me if im not, a tuple is an array with () instead of []?
well, not an array, a tuple then
 
6:58 PM
A tuple is not an array, and a list is not an array. An array is a different unrelated thing.
 
We rarely speak of arrays here, actually
 
Sam
sorry, I keep calling lists arrays.
Python is not my main language haha
So locations = thing[0] and encodings = thing[1]?
 
"A tuple is like a list, except you create them like (1,2,3) instead of [1,2,3]" is one basic way of thinking about it
 
Pretty much
 
It doesn't capture the entirety of the difference between the two types, but it's true enough
 
Sam
7:00 PM
@Kevin That is exactly what I meant
Thank you for your help!
Good evening
 
Kevin what do you think. Is module 'pip install bitcoin' enough for check private key or I need some others module?
 
It certainly seems like a good place to start.
 
Great. Thank you
 
ah, Samuel
a.k.a. the SO userscript generator :D
 
wim
7:07 PM
yeah, samuel's github should have been the first place I checked 😏
 
Who needs color and legible font sizes when you could have silly faces like ( ͡° ͜ʖ ͡°)
 
Sam
Hello, I am back with another stupid question.
When I want to convert an int to a str, I use str()
 
hello
Convert to str or print?
 
Sam
is there a way to do this (string) to a numpy array?
 
str(arr)? :P
What are you really trying to ask?
 
7:19 PM
I almost never use str directly these days. I'm all about f-strings lately.
 
Sam
No i mean i have a str, and want this to be a numpy array
 
@Sam what kind of str? Do I really have to force this out of you with a plier?
 
Sam
Arent all str's the same?
 
@wim Does that script work? Doesn't seem to be doing anything on my machine
 
The answer will be very different if the str is "1 2 3 4 5" vs "a,b,c\n1,2,3"
 
7:20 PM
^
 
Sam
I am using an open() function to read face encodings, and the face_recognition api takes numpy arrays and not str's (that I got from the file) so now I need to convert them to a numpy array
The string looks like this:
`[-6.02926165e-02 8.70469883e-02 5.05164489e-02 -7.49783292e-02
-6.32102042e-02 2.43803207e-02 -5.54725230e-02 -2.92041004e-02
1.51005432e-01 -8.86175931e-02 2.60540545e-01 1.36290900e-02
-1.30734682e-01 -6.73805922e-02 -4.39502671e-02 1.46551773e-01
-1.53722674e-01 -1.23641536e-01 -8.51969570e-02 -1.28170654e-01
3.77598889e-02 2.68947706e-02 -5.64474706e-03 6.06532954e-02
-1.99078336e-01 -3.33038777e-01 -7.88214803e-02 -5.84626533e-02
4.88681793e-02 -1.37442932e-01 -1.54427979e-02 7.32424483e-02
 
the string contains []?
 
Sam
Yup, it is a numpy array converted to a string, and now I need to change it back
 
Then don't do that in the first place. Use a sane output format.
 
Sam
Well, how are you planning on doing that, this is the only sane way to do it
 
7:23 PM
Then I guess there's that. Sorry about it.
 
You should be able to just call ast.literal_eval with that to get a Python list of floats. I assume there is a short step from that to a numpy.array.
 
@Aran-Fey Likewise, it just gives me jQuery is not defined
 
@PaulMcG missing commas
 
urk
 
Sam
This is my code:

    for filename in glob.glob(os.path.join(IMAGES_PATH, '*.jpg')):
        nora_encoding = filename + ".nora_encoding"
        # check if there is already an encoding
        if(os.path.exists(nora_encoding)):
            identity = os.path.splitext(os.path.basename(filename))[0]
            # get the face encoding and link it to the identity
            encoding = open(nora_encoding, "r").read()
            database[identity] = encoding
        else:
            # load image
            image_rgb = face_recognition.load_image_file(filename)
 
7:23 PM
@PaulMcG but this is the only sane way to do it, so we're stumped
 
Sam
At least, another way hasn't crossed my mind
 
stuff_i_read_from_the_file.replace(' ', ', ')?
 
@PaulMcG ugh
 
@Kevin Would you mind dropping all the background-colors from the CSS in the next version? All that white doesn't go well with my dark theme
 
could we please not help give a workaround for the Y in XY?
he'll only come back next week when he advances to Z
Sep 5 at 17:00, by Andras Deak
yesterday, by Andras Deak
20 hours ago, by Andras Deak
@Sam please try to increase your signal-to-noise ratio and fast. The last two screenfuls of your activity here gives me pain.
reference ^
 
Sam
7:26 PM
Oh sorry about asking for help
 
@Sam fix your output first
 
Sam
Instead of quoting your own message quoting over and over again, tell somebody what they are doing wrong before you correct them
 
@Aran-Fey Ok. I only included them in the first place because without them the boxes were totally transparent. Now that we're co-opting the wmd-prompt-dialog style, it should be properly opaque without them
 
hi, i am having trouble with selenium and clicking on the 'next' button of the page im looking at. is this the right place to ask?
 
7:27 PM
@ThelurkerLurker If you're using python then yes
 
and instead of saying "hmm, what do you mean, how can I do that?" you said "there's no other sane way", which is somewhat disappointing given your quoted history
 
@Sam Andras' point is, if you are the one who writes out that file, then write it out in a way that you can read it back again.
 
the code im trying to use is:
`next_button = driver.find_element_by_xpath('//div[@id="FilterItemView_page_pagination"]/div/span/div/ul/li/a[@href="#next"]')
        print('next')
        driver.execute_script("arguments[0].scrollIntoView();", next_button)`
but it seems to stay on the same page
 
@Sam please read the messages ^ posted while you were away
 
7:29 PM
@Kevin I wanted to respond with a thumbs up emote... but there isn't one :(
 
I've got my eye on adding that, but I have to either 1) decide which of the ten zillion members of the "miscellaneous symbols" to add, or 2) include them all and add a scrollbar
 
@ThelurkerLurker Well, all you did was scroll the button into view. What happens if you click it?
 
wim
@Aran-Fey works for me, as you saw in screenshot..
 
ive tried to add next_button.click() but i get the error ElementNotInteractableException: Message: element not interactable
 
Sam
Is it possible to convert a string like "[22030]" (yes a string, even though it has []) to a numpy array, so it still looks the same, also [22030], but this time it has the type() of numpy array with numpy.fromstring()?
 
7:32 PM
@Sam No.
 
Sam
Okay
 
@wim whoops, it seems I'm a bit dense tonight
 
Sam
Is there a numpy function for that? I want it to look exactly the same but only the type() is different
 
wim
 
@wim the best kind of correct
 
7:33 PM
docs.scipy.org/doc/numpy/reference/generated/… gives some examples on what it expects, and how you can accommodate different (or even no) separators
 
aaaahhh, the script creates a black emoji button over my black text box. No wonder I thought it's not doing anything...
 
hehe
 
user6568562
@Sam I think the question of whether you're the one who codes the output in the first place is a valid one; So, you know, are you ?
 
Sam
What is that sentence
 
@Aran-Fey You have gone beyond Dark mode to Redacted mode
 
user6568562
7:35 PM
Fair enough
 
Sam
@randomhopeful I read this 10 times and still don't know your point
 
user6568562
Nevermind
 
Sam
If I convert the [ to ` `'s, and then make it an array, will numpy accept it?
 
I think random's question made perfect sense
@Sam go play with it. Python is easy to code.
Read the docs and hack whatever you want. The world is your playground.
 
Sam
@AndrasDeak Can you convert it to simple english for me then?
 
7:37 PM
@Sam You ask us this, but you have a Python environment with numpy right in front of you
 
Sam
Yes, but the problem is, I am using dlib, and I do not know what the hell I did or what the hell I made but it takes something from C++ and that takes over 2 minutes to compile, but I'll try
 
@Sam '"Are you the one who writes the code that produces the output?" is a valid question. Are you the one who writes the code that produces the output?'
@Sam time to learn what an MCVE is
 
Sam
Oh now I get it
 
you don't need a 20 GB dataset to figure out how to turn a string you want into an array, do you?
(not that I know what dlib is)
 
Sam
Its for machine learning but it's written in c++, and I have some libs from c++ that need to compile every time
Good night
 
7:40 PM
rhubarb
 
Yes, but you are asking basic Python and numpy questions. If you are going to do a lot of this work, then you will probably want a more nimble development environment.
Good night and good luck
 
i see my problem is that the element is not coming into view...
 
that should be v6
 
Kevinver
now he'll have to rerelease with the correct version number
 
7:52 PM
You: you can't just decide what codepoints are "worthy"
Me: that's where you're wrong, kiddo 👉🕶👉
 
... Wait.
 
Compromise: v6.9999999999999
 
 
3 hours later…
10:43 PM
So I've been having constant pretty high iowaits since my debian upgrade. I've finally gotten around to investigating it, and it was firefox. After a little googling I realized I should disable disk caching, and it's done wonders for my system. The HDD can finally breathe again :D
interestingly the startup also got much much faster, because fox is no longer struggling to reconstruct whatever it is that it reconstructs from the disk cache
 
wim
11:04 PM
when does ctypes.pythonapi.PyTuple_SetItem actually work? always segfaults for me.
 
11:15 PM
Doesn't PyTuple_SetItem itself only work during tuple construction?
Ah, no, that's probably ...SET_ITEM
 
11:44 PM
Wonder if I should disable disk caching...
@AndrasDeak does that mean every time you load a page everything is reloaded, like it was the first time you visited the page? That might improve startup performance but make web browsing slower I would think
 
@Dodge definitely not, it still caches in RAM. Don't know about reboots, though.
even if each reboot clears all cache (which might not be the case) the performance hit should be marginal compared to constant IO. Everything I did in a terminal started to lag a bit.
It's easily possible that my pathological habits (with 500 tabs) are to blame here
 
00:00 - 14:0014:00 - 00:00

« first day (3267 days earlier)      last day (1696 days later) »