« first day (2666 days earlier)      last day (2507 days later) » 
00:00 - 18:0018:00 - 00:00

18:00
@JulianRachman I'm just curious, since most of the work indeed seems to be IO and networking: why are you against the loops "waiting on one another"?
@roganjosh oh god
@AndrasDeak well what if a transaction is missed during the wait time?
What if the transaction is missed when you're writing to the csv?
surely there's a way to handle that consistently
@roganjosh With that price it comes out to 613,200 for a full year. Thats incredible...
@AndrasDeak Hmmm ok then what do you suggest?
@ZackTarr yep. Don't get sucked in to the low hourly rate of instances. I wouldn't fall for it in a supermarket but I definitely did in the instance world.
18:04
@roganjosh thank god i am only using their free tier
@JulianRachman I don't have enough domain knowledge in the subject, but it seems weird to me that you're worried about missing transactions due to threading when you're not worried about missing transactions due to network ping time and IO
i mean so far i do not think i have missed any
my very naive impression is that transactions should be a trackable thing and not just a single scream in the wind, hoping that someone hears it
but I know nothing about blockchains and networking in general, so my naive impression might be completely wrong
If the exchange site only announces transactions once for a tenth of a second, that doesn't seem like a very good exchange site
@roganjosh Im going to start a subscription based business that charges you only pennies on the hour. Then bank on them not doing the math :D haha
18:07
@ZackTarr I read an article a few days back about the growing popularity of gluten-free and organic water. People pay premiums for it. Your idea will definitely catch but you have big competition.
Maybe there's a market for organic clouds?
There we go. Ill charge you only $.10 an hour for a case of organic water.
@AndrasDeak but without looking at the blockchain, do you still think that based on what i am asking for, i should use multithreading?
Not necessarily, but I wouldn't discard it on sight. That being said, I've only ever used multiprocessing.
you need to read into the difference between multithreading and multiprocessing and the global interpreter lock of python
based on what was said here (stackoverflow.com/questions/3044580/…) in Simon Hibbs's post, i think that multiprocessing is what i want
jjj
jjj
18:13
^ what was that about?
I guess I should be thankful I can't see deleted things
> I know anyone can check this with a C# compiler. but when we don't have a compiler at the time , and really need to know the answer here there is stackoverflow the life saver.. and I think this questions should be in StackOverflow. So anyone can find answer easily.
ideone exists -__-
jjj
jjj
huh
Was that the actual question?!
18:15
The question was basically what null + "" would result in…
or the Python equivalent of None + ""
18:26
Anyone know a better way to check for parentheses being correct. Like every open have a close? I found this https://stackoverflow.com/questions/38833819/python-program-to-check-matching-of-simple-parentheses
But am hoping to find more of an index as to where the "error" is.
A parsing library?
(python will usually give you an error on the same or the following line where there's a mismatch)
I assume this is not about checking your code during development
Correct. Let me get show you what Im doing. One sec.
But how do you know where the missing paren is for 1 + (2 * 3) - 4)? It could be (1+(2*3)-4) or 1 + ((2*3)-4) or 1+(2*(3)-4) or 1+(2*3)-(4)
command= """
::{0}::
x=
(
{1}
)
clipSaved := clipboard
StringReplace, y, x, xxxx, %clipSaved%, All
clipboard := y
Send, ^v
Sleep, 200
clipboard := clipSaved
Return


"""

This is being filled with user input and is then put into a AHK file. In AHK they do multi line text with () and I dont want my user to break my AHK file but still let them have () in the text, if that makes sense
@Kevin The more I think about it I dont think it will be possible to find the exact one.
18:31
I recommend a parsing library or seeing if AHK has a linting mode
Linting. havent heard of that? Ill look for it though.
Because right now a user could do this inside of the {1}:

)
#insert mean code
y=(
18:46
^ python 2 question :/
All of those are semi-reasonable possibilities if you don't know what happens when filter's first argument isn't a callable
@AndrasDeak Update: just made a multiprocessing script and so far it is working pretty well
glad to hear that :)
i am trying to look into optimizing the code for performance
Or am I misreading your ":/" as "the answer is so self-evident I don't know why this is a question" when it actually means "why are they still quizzing people about dusty old filter when list comprehensions exist?"
18:54
I think they're annoyed that the answers all assume you're using python 2
It's because the correct answer should be <filter object at 0x7f77c184aeb8> :I
Well, that's a ridiculous answer. How do you know that'll be the memory location?
@Rawing I think you'll find it's actually <filter at 0xcb65908>
They should've specified: "If executed on a PC with exactly 1 unused memory location, which is located at 0x7f77c184aeb8"
On my machine it's <filter at 0xtrappedInReprFactorySendHelp>
5
18:55
they used to ask that, but then Meltdown came
I got one of the questions wrong, and when I clicked on "retake assessment" the website passive-aggressively sassed me with "Think you can do better?"
are there any performance optimization techniques for multiprocessig?
you should fight that website
@JulianRachman like?
@Kevin do you have en.wiktionary.org/wiki/ba-dum_ching hotkeyed?
18:59
@KevinMGranger hold his beer :)
@JulianRachman What is the limitation you currently have?
new issue for rabbit: it should link to audio of that after random Kevin messages
If there were performance optimizations that applied to 100% of multiprocessing applications, then they would integrate those optimizations straight into the module so you could enjoy their effects without having to do anything. So either they exist, and you're done; or they don't exist, and you're done.
@JulianRachman first profile your code, make sure most of the time is not spent with writing csvs and making requests
@piRSquared Not sure if he does but Im tucking that page away for sure! haha
@ZackTarr that's an AHK project for you.
19:05
:D
::badum::
Send, https://en.wiktionary.org/wiki/ba-dum_ching
return
recbg
its lunchtime!
19:36
@AndresDeak most of the time it is requesting the jason of a particular site
@roganjosh i am not sure what you are asking
Perhaps he's asking "what is your current performance bottleneck?"
If you spend 1% of the time fetching data from the Internet and 99% of the time writing csv files, then doubling the efficiency of data fetching won't improve the total run-time very much
@Kevin is correct. "Optimise multiprocessing" is pretty broad.
And if your time is spent requesting something from a server then maybe send async requests
requests-futures is super simple for that
But again, this is all very generic because you're asking high-level questions
@JulianRachman that was to you btw. Swapping between SO and chat has muddled up my tagging habits :)
19:51
Where is QPos coming from in this answer? stackoverflow.com/questions/31380457/…
I am trying to send a argument to listItemRightClicked() but this did not work?
`self.topListWidget.connect(self.topListWidget,QtCore.SIGNAL("customContextMenuRequested(QPoint)" ), lambda: self.listItemRightClicked(self.topListWidget))`
@ZackTarr those look like callbacks, whatever calls them automatically passes something as the second argument
@ZackTarr you're passing a lambda that doesn't take any arguments; the answer passes a function which has one input argument
either use what they're doing exactly (if that works), or lambda QPos: self.listItemRightClicked(self.topListWidget,QPos) or something like that
Yeah sorry let me get you a db post set up to show you mine.
note that I don't know any GUI stuff, this is just what I'd expect looking at the patterns
For sure! I appreciate the eyes on it.
@ZackTarr And when something doesn't work, provide more details. What doesn't work exactly? Do you get an error? If so, tell us what it is. If not, describe what happens in your app that you don't want.
19:58
Whoops thought I mentioned that.
Traceback (most recent call last):
File "H:/CCLCC/gui9.py", line 123, in <lambda>
self.topListWidget.connect(self.topListWidget,QtCore.SIGNAL("customContextMenuRequested(QPoint)" ), lambda: self.listItemRightClicked(self.topListWidget))
TypeError: listItemRightClicked() takes exactly 3 arguments (2 given)
Thats the error I get with the code on the DB post.
Its like when I tried doing the lambda it canceled out whatever was sending the QPos?
I was hoping to make the function more dynamic and accept a qListWidget object but I may have to just create two functions that do it for each list.
This works for error messages, too
I'm also not familiar with the GUI stuff here but it really looks like you're calling your function with one argument in lambda
In which case, the error makes sense
@Code-Apprentice Yeah as you can see up above I tried using the `` method. Ill book mark this one.
"self" is counted as an argument in the error, so you supplied one, "self" makes 2, and it correctly reports that you're missing one
TypeError: listItemRightClicked() takes exactly 3 arguments (2 given). This is referring to self.listItemRightClicked(self.topListWidget). One thing to realize is that self is passed as a parameter. So with self.topListWidget, you have 2 parameters, but apparently the method needs another one.
20:03
Right I was hoping to find out where it was getting the QPos so i could send it too. But it may be inside of a module as a predefined that I havent found
@ZackTarr For multiline formatting, press Ctrl-K.
@Code-Apprentice Thanks!
As Andras mentioned earlier, the callback that you pass to connect must take a parameter.
This post has a QPos in it too. https://stackoverflow.com/questions/22489018/pyqt-how-to-get-most-of-qlistwidget

But it is not defined except for in the arguments. Weird it must send it on the connect.
@AndrasDeak Right I triend that in the lambda but I cant find where to get QPos to send it. Except for in the fashion they have with no parameters
I am not familiar with QT, but I have some experience with other GUI libraries. Typically an event handler is required to accept certain parameters. You can name those parameters whatever you wish and the caller just passes in values.
20:08
@ZackTarr You don't send it!
you pass a callable, which gets called as in _call_back
the argument of the callable is QPos or foo or Mary Poppins, whatever you want to call it. It happens to be called QPos by that answerer
@ZackTarr lambda QPos: self.listItemRightClicked(self.topListWidget,QPos) <- QPos is defined as the argument given to the lambda and is passed on to listItemRightClicked().
just think of what a lambda is...
>>> f = lambda foo: print(foo)
>>> bar = '3'
>>> f(bar)
3
I think that may be an issue... Im using it without knowing 100% about what it does.
disclaimer: awful patterns there ^
case in point: no foo in the function call
>>> def f(foo): print(foo)
...
>>> bar = '3'
>>> f(bar)
3
same thing sans lambda ^
Okay that part helps. But I guess I am not seeing how QPos is sent in the example. because we are passing this "self.listItemRightClicked" and I thought that would only send self as the argument. And would give me an error saying takes exactly 2 arguments (1 given).
20:14
Hi all
@ZackTarr how do you know it doesn't?
and are you not setting a default value for QPos in the function definition?
What doesnt? And I dont believe so. I was saying Id expect their code to error like that but it doesnt.
their code has no error! Yours does
they are passing a function, not a curried function. If the callback gets passed 2 arguments, it works. Presumably this is exactly what happens.
Right. And sorry for the confusion. And yes I believe so.
20:18
the question is how self.listWidget_extractedmeters.connect calls the callable passed to it as its last parameter
This is the call back right

self.topListWidget.connect(self.topListWidget,QtCore.SIGNAL("customContextMenuRequested(QPoint)" ), self.listItemRightClicked)
that's how you connect self.listItemRightClicked as a callback, I believe
this will make it so that when <thing> happens to self.topListWidget, self.listItemRightClicked gets called somehow
Correct. Which piece it called a callback though? The connection above or the function self.listItemRightClicked?
so look at the documentation (if exists) of the object which .connect belongs to and see what it does
Trying to understand all of this, sorry for all the questions
20:21
@ZackTarr as far as I know the function that gets called later, but don't take my word for it
Noted. and I will go look for some now.
as I said, I have little to no practical experience with GUI stuff, I've just seen these patterns here and there
Hey I appreciate it all the same!
no worries :)
@ZackTarr It appears that self.listItemRightClicked is the callback. This is the function that some other peices of code calls back to when some event occurs.
20:35
@ZackTarr there's one thing I don't like (after finally looking at your dpaste): your callback has 2 parameters other than self. Both answers you linked to have only one. In case you're setting these callbacks in the same context, they are almost certainly to be called with the same number of input arguments
It sounds like you need to read more about callbacks and event handling to understand this better.
so the question is not what QPos is; the question is what your lst is
@Code-Apprentice Thanks for the clarification. And yes reading is very much so needed. Id like to go back and get like my masters in CS rather than just doing it on my own.
and if it's something coming from outside, either use it as a global name and not pass it, or you'll need to use a lambda in your .connect as lambda self,QPos,lst=what_you_pass_as_lst): self.listItemRightClicked(self,QPos,lst) for instance
as you see, you probably have to end up with a callable that accepts 2 parameters
Lst is going to replace the listWidget_extractedmeters in the SO post. Basically I wanted to make their function work for any list that I pass it.
And I have tried the .connect as lambda self,QPos,lst=what_you_pass_as_lst) but I cannot pass in QPos as it is not defined except for in the callback function. I just dont know what to send to the call back for QPos
wim
wim
20:39
when people say "spend at most 30% of income on rent" are they talking about pre-tax or after-tax income?
@ZackTarr OK, I don't really think I can help anymore here. You have to understand how function calls work, then how lambdas work (almost the same, just weirder syntax), then read about callbacks and event handling as Code-Apprentice has already said
lambda self,eelful_hovercraft,lst=what_you_pass_as_lst): self.listItemRightClicked(self,eelful_hovercraft,lst) <-- does that help?
that's all I can say even if it doesn't, sorry
No worries! I think Im on the right track now. QPos looks to just be the position of the mouse when I right click
@wim my rule was post-tax and I don't think I'd ever seen it mentioned before, I decided on 1/3rd. Why?
wim
wim
just curious
I've seen it many times, but they don't specify gross or net income, which makes a huge difference ...
@roganjosh oh lol i got so lost in the chat i didnt see
20:52
@wim what's interesting for me is that I'd not seen that at all, yet I'd settle on a very similar figure. But mine was definitely net income.
Friday afternoon cabbage all
@wim The figure I remember was 25%. I guess times are a-changing.
@toonarmycaptain do you own a house?
@roganjosh Yes, why?
20:58
@toonarmycaptain then you're only paying a mortgage. If you could only rent then you'd have no choice but to let more of your budget go :)
@roganjosh I don't understand the distinction you're making? I remember a "don't spend more than 25% on rent" admonition.
@toonarmycaptain when I was living in London it was £1000 a month for a single room with my bed bolted in near the ceiling; I could touch the roof lying in bed. 25% of income on rent just isn't realistic in a lot of cases, so you have to up the proportion of your income you're willing to pay. A mortgage isn't as exposed to hikes as the rent market is
That doesn't change the advice for a healthy budget. The advice in that case would be to move somewhere like Aldershot or Farnborough and commute in (where I know you can get a room as of last month, for £500). Part of the reason for that advice (I'd assume) is to allocate money to savings towards a house and other needs/contingencies.
stating the obvious: this largely depends on country-dependent customs
cabbagey cabbaggers my fellow cabbaging cabbaggers
21:12
@toonarmycaptain I was contracting so it was fine for me while I was there, and tech in general is well-paid, but a huge proportion of people are just getting by in paying their rent
@toonarmycaptain I'd be surprised if you could find any statistic that the cost of accommodation (I'm not sure how to refer to it, to include renting or mortgage) has got cheaper in real terms over the space of a generation.
@roganjosh I don't disagree. I think the term might be "housing," at least across UK/Aus/US?
@toonarmycaptain but that term make me think of social housing, so that is a different matter :)
wim
wim
21:22
@roganjosh ugh, London is one of the crappiest places in the world to live
for the price I paid for a mouldy disgusting flat in London I have a luxury condo in Chicago
for some reason that reminded me of this :D
I saw it linked once and I don't even remember why I remembered, or whether it's legit at all
@ZackTarr you don't need a Masters degree to be a good programmer. Mostly it takes time to learn these things.
wim
wim
might have been me that linked it. yeah, seems legit. cool site!
21:44
@wim I went from that to a month in Melbourne. It was like a Turkish bath going from one extreme to the other. London is just. Well, I don't want to insult anyone...
22:01
@idjaw just as I was leaving.... :( you planned it didnt you !?!?!?
Oh well I will let it slide since 5-0 and 4-0 going into the B's games :D
he posted that almost an hour ago :P
@AndrasDeak shhhhhhhh I like to take my time to get ready to go home :D
 
1 hour later…
23:16
Cabbage all, I've got a problem using round(). docs.python.org/3/library/functions.html#round I need to round a number ending in .5 upwards not downwards. How should I proceed?
every other number ending in .5 rounds upward ;)
I am trying to centre text in a terminal, because it's rounding incorrectly I believe am getting the following output as a result:
no (well, probably not)
That should look like a triangle,not a wizards hat ^
Ah, yeah, that might be bankers' rounding. I don't think there's a "right" way. It will never look like a triangle since you're plotting on a rectangular grid
but anyway there are solutions here stackoverflow.com/questions/43851273/…
you can use the decimal one to play around with rounding strategies to find one you like
wim
wim
23:23
"No no no no nopity nope nope no" <-- long enough for community guidelines? LOL
23:34
It seems to be what I am after thank you. I haven't managed to integrate that yet but I will be interested to see what it looks like when I have
I suspect it will be a different kind of wrong, but who knows
That won't be a first but it will still be interesting. :D
Is there someting wrong with underscores in filenames for .py files in pycharm? I just added a new file to my project called link_finder.py but the symbol turns from python file to textfile? the moment I add the underscore...linkfinder.py works fine
got it it's saved as pattern for textfiles for whatever reason ^^
23:49
it's probably not a good reason :)
I'm actually impressed how carefully they designed the pycharm user interface so that you accidentally mark files as text files all the yam time
and usually without noticing, too
That's what people usually do in a python-aware IDE, right? Write text files.
You win this round. Technically.
no no, I clean sarcastic now
00:00 - 18:0018:00 - 00:00

« first day (2666 days earlier)      last day (2507 days later) »