« first day (3569 days earlier)      last day (1378 days later) » 

12:24 AM
Here's the aliases I decided on:
  environment.shellAliases = {
    collect_all_garbage = "sudo nix-collect-garbage -d";
    collect_some_garbage = "sudo nix-collect-garbage";
    follow_nginx_log = "journalctl -fu nginx.service";
    truncate_logs = "journalctl --vacuum-size 500M";
  };
I'd try to help you but I'm sure all I'd do is be typing terms into search engines alongside you. What does Google show you?
 
@A.Hendry please see our room rules about asking questions here that are also on main. Specifically, that you should wait 48 hours
 
yes, and that.
 
I don't intend to be rude by moving those messages; I apologise. But they're ripe for getting others involved in your problem... which is exactly the situation that the rule tries to avoid
 
12:42 AM
@roganjosh No of course, I understand. We try all sorts of crazy things when we're desparate.
@roganjosh Perhaps as a follow-up, can you recommend any other active forums where I can post my question?
 
12:59 AM
@A.Hendry Thank you. I'm afraid I don't know where else to ask but I do hope you get the problem sorted :)
 
you might share it on reddit.com/r/learnpython, maybe... be sure to read the forum rules, but I think they have a weekly thread you can put it on.
 
1:32 AM
additional aliases:
aliases = "nixos-option environment.shellAliases";
edit_config = "sudo vi /etc/nixos/configuration.nix";
rebuild_config = "sudo nixos-rebuild switch";
nice I just verified my letsencrypt certs are very current. :)
 
2:25 AM
Yes, it has some Paths and Root directory structure
and as we know on Windows and Linux Root directory have different structure
 
@AaronHall The weekly thread is called "Ask Anything Mondays" and is not intended for that type of code (it is for "simple questions" whereas this requires a full MVCE and therefore a full thread). That said its "anything" so as its Python we might try and answer but checking on that thread tends to diminish as the week progresses.
Note the posting guidelines are displayed on all those threads if someone did want to post - it includes using a SSCCE our version of MVCE
 
2:47 AM
@PM2Ring I had two accounts due to concerns about work (when I signed up on Security and Stats it would be easy for co-workers to identify my questions and I didn't want that) so I still consider that a good use-case (esp. with new sites like IPS & workplace). I also don't like the announcement because it is unclear (and to be clear I didn't/don't want a merge - I deleted my other on purpose because of everything) - I kept this because of Room 6 & Worldbuilding
^ also as Aaron was pinged in the last message I assume this will be readable - your message is unclear and makes the usage I had for my old accounts (which was completely within site rules) seem like I was trying to cheat the system. I would suggest a complete rewording that isn't so adversarial or delete that post because it is very unclear
I would add this as a comment but the comments seem to be purged rather regularly on that post so why bother with that
 
3:15 AM
@LinkBerest did you... inadvertently... wind up voting for your own accounts? Or do something else you can't do with a single account?
Otherwise, I don't see how you could interpret the post to which we both know you are referring as you trying to cheat the system.
 
RSM
3:55 AM
Hi everyone, i have a format query on python. I am trying to use an if else statement for pandas dataframe. I am aware of the np.select and np.were but i have to write a multiple line code in the if and else block. Is there a way to do that? I am not sure of it.
 
4:07 AM
So brew install pypy apparently deleted all my packages (numpy, matplotlib, etc.)...
 
not an answer, why would you brew install anything python? I used to own a mac I was more than happy to use pip + venv or conda for most things
 
 
2 hours later…
6:12 AM
@WayneWerner There is no way at all to guarantee finalisation, even on implementations using reference counting. Contrary to what The People Of the Internetâ„¢ say, using __del__ as a safety hatch is not a bad idea, but it won't fix all problems either.
 
6:27 AM
@RSM Can you provide some short example of what you are trying to do? Multi-line code can mean a lot of things, some of which will work and others that will not work easily.
@user76284 Are you sure you are still starting the same interpreter?
Note that pypy does not even have numpy or matplotlib compatibility.
@python_learner A lot of people do not use the scientific/conda stack. Brew is great to manage several Python versions for a broad version range during development/testing.
 
6:39 AM
print("Wello Horld!")
 
RSM
I am looking for something on the lines of:

if (df[var1] == "Vox TV" :
df = df[df.col3 > 0] # optionally remove 0 valued rows
df = df.sort_values(by='col3', ascending=False).reset_index(drop=True)
totals = df.col3.cumsum()
cutoff = totals[totals >= df.col3.sum() * .6].idxmin()
print(df[:cutoff + 1])

else:
df[var3]=0
print(df[var3])
 
6:57 AM
Where do you intend to use select or where in this?
Please take a look at the code formatting guide, by the way. It comes with a sandbox for practicing. Especially correct whitespace formatting is very important here.
 
RSM
I am not sure of the syntax, previously i have used where and select in simple one liner if statements but this is something new for which i am having syntax issues
@MisterMiyagi ok, will check it out
 
@RSM I'm wondering about the logic, not the syntax. What parts would you like to use select or where on?
 
RSM
ok, i have experience in using np.where as follows:
df['Activity_2'] = pd.np.where(temp.str.contains("0"),"None",
pd.np.where(temp.str.contains("email"), "email",
but in case i need to use multiple line inplace of "None" how do i do that?
 
 
1 hour later…
8:18 AM
Does flagging (as spam) automatically cause downvoting?
Ah, looks like someone else found the spammer due to the same trigger.
 
8:39 AM
@MisterMiyagi yes
 
Hi
I asked myself why should I move from PHP to Python? I googled a lot, there are differences. But wanted to know why should I do that?
Any suggestions?
 
Hi guys, my friend told me to use lists/dictionaries instead of pandas currently because my basic python foundation is not good (which is true). Told me pandas is only good when I need to construct joins or if my data set is large. I am not sure but I think i'll end up having to think harder on the logic and take much longer if I use purely lists/dictionaries to do summarizing/graphing spreadsheets compared to if I used built in functionality of pandas.
I am focused on getting analytics out as fast as possible even if it is not in the most efficient way computationally because I am running a business and i'm getting things done using pandas. I find pandas more intuitive in manipulating data because I can wrap my head around it more compared to creating several layers of list comprehensions and thinking of the loop logic
 
@Exception Unless you have a pressing use-case that benefits from Python or is unsuitable for PHP, there is no "should".
 
Said if I didn't need numpy learning pandas will make it more complex?
 
@Exception nope.
 
8:47 AM
@Pherdindy My rule of thumb is to use Pandas when I need to work on entire tables/series, and builtins otherwise.
 
@Pherdindy if your problems are data-oriented then numpy/pandas are appropriate. If you find it easier to work with pandas rather than native python it's a good sign that you're using the right tool. But your friend is also right that you should also learn the basics of the language first, because some fundamental behaviour of the language can bite you in the butt when you're happily using pandas.
 
I'm working mainly with excel spreadsheets and coming up with graphs/summaries
So I have to relate data between IDs
 
If you have pandas available anyways and are familiar with it, there is little harm in preferring it.
 
Right thanks was just wondering he actually asked for an example of how I used pandas so I gave him what I was working on and he converted it to a list comprehension in a few seconds. He doesn't use pandas though but it seems harder to do it the way he did it
status_exclude = ['Delivered', 'Canceled', 'Pending', 'Ready to Ship']
orders_notreturned = ex[(~ex['Order Number'].isin(compiled_returns['Order Number'])) & ~ex['Status'].isin(status_exclude)]
He converted it here
notret = [order for order in ex2 if ex2['Order Number'] in Set(r['Order Number'] for r in returns) and ex2['Status'] not in excluded_status]
But probably not a good idea to loop in a dataframe yeah?
Well python isn't his main language but he is good eitherway
 
in Set(r['Order Number'] for r in returns) <- this seems fishy. It will rebuild the set again and again. This only works to imply a placeholder that is in reality built before.
How large is the dataset for this?
 
8:56 AM
About 20,000 rows for one of my spreadsheets
Seems much harder to even use a list comprehension
 
and r['Order Number'] is 100% mutable, so not hashable
 
Since I have to be mindful of the loops and all
 
(for the record, not having loops can still be terribly inefficient)
 
Right definitely but in terms of deploying faster I think it takes more skill to do it with lists/dictionaries lol
 
I'd only change your version to spell out the boolean masks as separate variables for readability
 
8:59 AM
@Pherdindy The real skill is to use the correct tool for the job.
 
So yeah, I think this is fine with pandas
 
Yeah thanks cool gonna learn the basics also it takes me a longer time to break down list comprehensions currently especially if it gets a little lengthy
 
When listcomps get a little lengthy they shouldn't be written in the first place
your friend's version has a genex in a list comp (and a NameError) which makes it pretty bad
 
Yeah it takes me longer even if I spell out the loops without a list comprehension definitely pandas made it easier in 1 liners but I do get his point abut the basics
Perhaps he wrote it in a rush when we were chatting
 
FWIW, writing this with a correct comprehension is more readable to me than the pandas abuse of binary operators and pseudo-operator-methods.
However, looping through 20k items is madness when the same can be done in pandas/numpy.
 
9:07 AM
Right I used to do things in VBA in excel
Problem there was there were no libraries I can work with
Made data manipulation much much harder and prone to error for me
And quite slow
 
returned_orders = ex['Order Number'].isin(compiled_returns['Order Number'])
excluded_orders = ex['Status'].isin(status_exclude)
inds_not_returned = ~(returned_orders | excluded_orders)
orders_not_returned = ex[inds_not_returned]
 
Even with arrays and all
 
FWIW2, as Andras said simply factoring out the boolean masks so that they are named would significantly increase readability of the pandas version.
 
your naming mileage may vary, I'd probably call all those masks inds_*
 
Right I had 0 mindfulness when it came to readability when I made this lol
Yeah probably best to do that
Tend to mess up my code as I go along when I don't make it neat
 
9:10 AM
@AndrasDeak Meh, domain jargon is a reality. Even unfamiliar naming certainly beats having to actively suppress my brain triggers for binary operators.
 
Take me longer to read through them
 
@Pherdindy You'll learn when you'll first have to read code you wrote 3 months earlier
@MisterMiyagi if you use numpy and pandas that's no longer a problem
 
Thanks for the tips guys well will tackle them once I encounter the issues lol just wanted to see if it was even a good idea to use pandas
 
9:36 AM
@AndrasDeak thanks for your reply "nope"
@MisterMiyagi haha
 
I started typing out a longer reply but Miyagi responded first with a similar message :P
I was going to suggest that you try python a bit and see whether you like it (more). But the end result is the same, there's no "should".
 
@AndrasDeak I guess so. Right now my brain is used to handle binary operators only on identifiers; having item access and method-operators in the mix always trips me up. The binary operators just drown in the noise.
Your rewrite is much more pleasant for me to read because it separates the two styles.
 
when you use numpy everything becomes an array, so you don't have to shift mental gears
 
Come to think of it, numpy'ish stuff such as a[(a>0) & (a != 10)] parses easily for my wetware.
 
Well, I guess arr[ind] could also be a scalar, but pretty much nobody uses actual binary operators with numpy :P
@MisterMiyagi so I guess it's indeed just the indirection of the method call that trips you up
your mental linter needs an upgrade :P
 
9:47 AM
I'm trying. My mental package manager is a mess. :P
 
Hi
 
@Janith Please take a look at the room rules. In specific, we ask not to advertise new questions (<48h) here to avoid duplicate discussion.
 
ok
 
Using the site version on mobile is so fun. The "move messages" button is literally right below "timeout", which locks the room. I'll pass on the Russian Roulette option for now :P
 
 
1 hour later…
11:18 AM
@roganjosh Oh I misclick that all the time, but the dynamics are very different after the button press so it's easy to backpedal
the real problem is that you can only move 1 message at a time from mobile
 
@AaronHall bad word choice: I meant it makes it look like I was breaking the rules. After edit it is not as bad but the whole time still seems to be "you shouldn't have two accounts" and should always just merge them so I don't really see it's purpose
@roganjosh you also cannot reply to transcript messages without loading the full site and then refunding it (as I just learned). So fun
 
You could take the permalink from the transcript and put together the reply syntax yourself...except there's no permalink icon either in the mobile transcript ¯\_(ăƒ„)_/¯
 
Chat gets no love
Mobile chat gets even less
 
11:35 AM
Just use the responsive site :P
 
(-.-)
That's like saying "just use the left menu" which I forget exists most of the time :)
 
12:09 PM
@LinkBerest ah, I'm just viewing the regular site but on mobile browser. I gave up with the chat interface a long time ago. I can super-zoom in to try hit the right buttons :)
@AndrasDeak thanks; I really didn't put it past the interface to just throw us all into the pit on a single click :P
*mobile chat interface, I meant, LinkBerest sorry
 
You cannot even upload a picture on mobile it seems (or that option is really buried)
Lol. Yeah this is bad, I don't normally use it but it loaded by default today so was trying it out
 
@Pherdindy PyXLL is a really good tool for working with Python in Excel.
 
hi all
didnt even know so had chatrooms lol
 
@LinkBerest you can't
@Nabih please don't ask for help here with fresh questions on the main site as per our rules
@Nabih welcome :)
 
whoops
 
12:30 PM
Hmm...never seen PyXLL before. That looks neat (not useful for my usecase but interesting). Wonder if it is cross-platform
If it's using .Net Core under the hood it should be but that only recently happened (late last year) and I know I run into issues all the time when working with office on Apple stuff so would be curious how they tackled that issue
 
Sam
General question for any word embedding experts here: when creating feature inputs to a neural net, we can attempt to add context to word2vec token embeddings by creating context/sliding windows of embeddings and concat them into a vector. Is there an argument to be made that we should remove stop words from slipping into the context windows? I guess its trial and error on the given task but I'm wondering if theres some theoretical argument which says we should
 
12:52 PM
@LinkBerest I appreciate your feedback. If we adjust every communication for every misreading, I don't see how we'd ever wind up with any sort of stable communication. It's been reviewed at least 100 times now. Some people just don't like it - maybe you're in that category. I'm not in this for the popularity, I want to make the site a better place. I can't please all the people all the time, I'll give the ol' college try, but some people won't be satisfied.
 
@tripleee hammered
 
hi all
 
@altF4 Hello. Maybe start with the question, and we'll try to give you our best answers/recommendations.
 
1:25 PM
@MattDMo thanks, I hate when it lacks the tag so I can't hammer myself
for a good hammering spree around this topic, see my recent activity
 
better get cracking on then
 
1:41 PM
Interesting, a commenter is asking if I'd mind licensing an answer of mine under MIT instead of CC. I didn't know that was even possible.
 
@altF4 Please see our room rules in regards to asking for help on fresh questions from main. You should wait at least 48 hours if you haven't already got an answer
I also suggest that you add the tag to your question, which will significantly increase its visibility
 
Now I need to figure out if "I release this under MIT" is sufficient, or if I have to paste the entire license into a comment, or what
 
@roganjosh oh okey
 
I'm pretty sure you have zero say in the licensing?
 
@roganjosh no
There's been a lot of talk about dual licensing. People specifying licenses in their profile. I just don't understand any of it
 
1:47 PM
This is interesting news to me. Hmm, I best go do some research
 
Try MSE
 
@laundmo,certainly I release the code blocks that I wrote into the public domain. Feel free to use them in any context, without my explicit permission or knowledge. Regarding the non-code-block segments, If you want to paste my entire answer into a "Learn Python" book you're writing, let's talk royalties ;-) — Kevin 33 secs ago
 
Honestly that answer has received enough edits that I don't even know which parts of it I own
 
@Kevin I'm told "public domain" doesn't universally exist. CC0 and WTFPL and friends might be more universal. Whatever that means.
"Public domain" does not exist in many countries, so if you want everybody to be able to use your code snippets without worries, consider using CC0 (if you like Creative Commons licences), WTFPL, Unlicence, or the like. — Chris Jester-Young Nov 30 '11 at 21:08
 
1:52 PM
From here we can see "Starting Feb 1, 2016, all new code contributions to Stack Overflow and Stack Exchange will be covered by the MIT License.". My interpretation of that post is that you don't have to do anything. It's the attribution that a user of your code has to comply with
 
@roganjosh "Update (Jan. 14, 2016): The promised follow-up is here, requiring attribution and postponing the change to March 1, 2016."
It never happened, hence CC-BY-SA version misery
You can see the licenses in the timeline for each revision
 
I think about 80% of people worried about being sued by me will be satisfied with a comment that says "I'm not interested in suing you for using my stuff" even if it's not binding, so at least I've made some progress here
 
Ugh. In any case, I don't think Kevin could give any permission, if only for the reason he stated - the answer is a collective effort
 
Note that's just SO-mandated licensing
@roganjosh are you a lawyer? :P
 
I edited in "that I wrote" after "the code blocks" exactly because I don't think I can license the additions other people made
 
1:56 PM
I've watched so much Judge Judy, I'm pretty sure I got this
I mean, I'm more in tune with punishing people who throw fish tanks out of windows or write off other people's cars they stole. But law is law
 
The law.SE post I linked says you're free to relicensee, but if I read it correctly you'd have to host the relicensed code elsewhere
This directly disagrees with naive layman impressions we might have. WANLs
 
The license I want to release it under is "if you become a millionaire off my work, pay me a million dollars; otherwise do whatever" but I don't think such a license exists
 
@Kevin you're free to come up with your own within legal reason
 
True. What I'm worried about is formulating a wording that a millionaire's lawyer couldn't squirm out of
 
"Kill a man on each execution of the code" is not an acceptable custom license, hopefully
 
2:01 PM
> [Douglas] Crockford started releasing his JSMin software under a custom license, which he created by adding the requirement "The Software shall be used for Good, not Evil" to the open source MIT License.

He has, however, granted "IBM, its customers, partners, and minions" permission "to use JSLint for evil", a solution which appeared to satisfy IBM's lawyers.
 
The more I look into this, the more convoluted it becomes. In any case, I'm going to hope that my assumption that I couldn't claim profits if someone uses my code for profit is also extended to not being liable if someone cargo-cults my work into demonic self-driving cars
 
Better paste in that one all-caps paragraph about no guarantees/warranties/etc that you see all the time, just to be sure
make sure it's in all caps, it's more binding when it's loud
 
Good thinking, I definitely need it to be shouty
 
2:10 PM
I don't think I can use JSMin because most of my software is used for Neutral. Nobody benefits from it, not even me.
Perhaps I could construct a moral framework on the basis that creating code is inherently virtuous, and indeed the only inherently virtuous act.
Everything else is only indirectly virtuous. Saving somebody drowning in a pond is virtuous because they can go on to write more code. Even saving somebody who can't code, like middle managers or the illiterate (but I repeat myself) is virtuous because they might have children that go on to code.
Can't recommend using this framework to dictate the behavior of AIs, however. They'll melt the earth down into grey goo and tile the universe with print("Hello, world!")
softwareengineering.stackexchange.com/a/30333/170919 indicates that, yes, putting the terms in all-caps literally makes the contract stronger. Law is fun.
 
2:26 PM
@Kevin :|
 
Feeling a bit nervous about several of the answers saying "don't re-license your stuff unless you know what you're doing, or you'll be harassed by legal trolls forevermore", since I did exactly that twenty minutes ago
Now when some bridge collapses twenty years from now and it turns out the CAD software was buggy and also contained my code, they'll send me to jail
"should have said NO WARRANTIES, bro :^)"
 
Ugh, the nose in the smiley hurts the most...
 
It's like a kid's game. No warranties, no take backs, no magic shields, secret lock and key 1 2 3 4 5 6
Oh well, I'll take my chances. I think my purpose in life is to serve as a warning to others anyway.
 
yamming cat on the keyboard
 
I thought you were proposing a name for my license. k0 grants the holder usage as long as they do not follow in my footsteps.
FAILURE TO GROW, OR MATURE, OR LEARN FROM HISTORY MAY RESULT IN PENALTIES UP TO AND INCLUDING BEING DOOMED TO REPEAT IT
Looks like "NO WARRANTY" protects you from having to provide implied warranties, which are typically merchantability (the thing does what an ordinary consumer would expect), fitness for a particular purpose (the thing actually works), and title (the thing you're selling is something you're allowed to sell)
Given that the code does what it says it does, and I wrote it myself, I think I'm safe there
 
3:03 PM
@Kevin What do you mean by "relicense" there, big boy?
i hope you haven't just committed an act of open source license proliferation? That's a disease ...
... societally speaking.
 
TLDR: I promised not to sue people that use a popular answer of mine. stackoverflow.com/questions/23294658/…
 
@Kevin I'd have thought merchantability is the last one
 
There's probably an alternate universe where they're switched. "merchantability of title" could be interpreted to mean "does what it says in the name"
 
in an alternate universe it refers to how catchy the name is for merfolk in a frenzy
 
 
2 hours later…
5:16 PM
I still like recursion.

If you're foolish enough to make mistakes enough to hit the recursion limit, you've earned the stack trace.
 
5:28 PM
A tidbit about the recursion limit - it is really a "max stack depth" limit. If you have a() calling itself recursively, then it is roughly analogous to a recursion limit (unless the initial call to a() is already 999 levels down in the stack). But if a() calls b() and b() calls a(), then a recursion limit of 1000 will only allow 500 levels of recursion. I trip over this in pyparsing where it is more like a() calls b() calls c() calls d()... and eventually q() calls a()
Oh, and using lru_cache will also cut your recursion limit in half.
It's really amazing that any of these parsers ever finish.
^^ lru_cache or any decorator, really
 
Wikipedia has a page on multi-licensing, which may (or may not) be helpful. This talks about dual licensing stuff under MIT & a CC license: softwareengineering.stackexchange.com/q/318777 but it's more about images & other ancillary data distributed as part of a software package.
Creative Commons themselves do not recommend using a CC license for software. See creativecommons.org/faq/… I should also mention that the term MIT license is slightly ambiguous.
And since holdenweb brought up the topic, here's WP's page on why licence proliferation is a PITA. Also see gnu.org/licenses/license-list#SoftwareLicenses & opensource.org/licenses which are linked on that Creative Commons FAQ page I linked previously.
 
6:02 PM
The problem is that I can't distill a clear set of actions --> consequences. I also don't think that it's due to the sources themselves, just a spaghetti of clauses
 
We need a "The absolute minimum every software developer should know about copyright and licenses".
16
 
6:22 PM
Yay! There's finally some info from Nick on this bug: The list of related questions is shown empty. It should be fully fixed in a couple of days.
 
Genuine question; why does Windows take an update and want me to go for Bing? It's now "suggesting" that I change my browser. Again. What cream do they scrape?
 
because "Bing is a web search engine owned and operated by Microsoft.".. promotion I guess
cbg bdw
 
I don't see how they make profit from trying to force me to use their browser. The only profit I can actually understand is from Google etc
 
I think the understanding troubles I'm having with Flask is that I don't understand how a project is supposed to be structured. Tutorials are making it seem that there should be an html page for every function related to a submit
 
@roganjosh Not qualified enough to answer that :) but if traffic earns you money.. why would they not..
 
6:28 PM
@JohnnyApplesauce what tutorials? :/
 
@roganjosh at least there are things like TLDRLegal
 
Some examples
https://opentechschool.github.io/python-flask/core/form-submission.html
Look at the first code snippet, and the second Python snippet. Since it doesn't say it explcitly: is it implying that the first snippet is or is not signup.html?
 
@AndrasDeak Oh wow. Bookmarking that one. Thanks!
 
in 2020 Moderator Election Chat, Jul 16 at 14:11, by Magisch
remember when microsoft got fined like 2 billion for pre-installing internet explorer with windows?
(then following few messages)
clearly the last gigantic fine was too long ago :P
 
interesting.. but I guess they are continuing with that though..
 
6:38 PM
@JohnnyApplesauce it's impossible for me to understand which template it's referring to without going back through the tutorial. The article itself doesn't "scream" that something is wrong
You probably do need separate templates if you want to re-render parts of the page. But that article just gives a redirect
Hmm, our own Antti answered about valid responses :) (it doesn't have to be a template)
 
@roganjosh From support.microsoft.com/en-au/help/4468227/… Activity history helps keep track of the things you do on your device, such as the apps and services you use, the files you open, and the websites you browse. Your activity history is stored locally on your device, and if you’ve signed in to your device with a Microsoft account and given your permission, Windows sends your activity history to Microsoft.
 
@JohnnyApplesauce you can also return flask.jsonify(some_object), for example, but I'm struggling to find a decent dupe for you, by searching without trying to use pre-formulated ideas
@PM2Ring so it's nothing convoluted - they just sell it off, I guess
 
6:57 PM
@roganjosh Legally, they can't sell personal data. Unless they anonymize it. But usage data is useful to Microsoft itself, since it helps them to optimise their products & services.
I assume they can get more fine-grained usage data from software they write. But even 3rd party software has to make system library calls, and they can be logged.
 
as of GDPR they probably have to specify in the ToS whether they can sell it
 
They can track whatever data they fancy, if they de-personalise it. The statistics are still valuable without the personal identifying information.
 
Thing is; I already have a Windows PC and I don't have much input in what it sends. This is a browser, specifically. It can't be to improve their products when most people just drop their own native browser
So I don't really buy "optimise their products and services"
 
Well they can't since nobody uses it :'|
 
You have some control, but AFAIK, the default settings are to send stuff unless you opt out. This caused a lot of anger when Win 10 was first released. Not just for the privacy violation, but for people in marginal areas with a small amount of expensive internet, it could chew up your month's internet in a couple of days.
 
7:07 PM
@AndrasDeak There's a honking "Get Started" button right in my face. Maybe I'll be first to take the plunge :P
 
@PM2Ring I also heard "good" things about Cortana the built-in immortal robot overlord
 
@AndrasDeak Yeah, the page I linked describes some of the benefits.
 
I wanted to disable Cortana (rip the whole feature out) and all the suggestions were that things break everywhere
 
@PM2Ring I would be interested to know the "people in marginal areas with a small amount of expensive internet, it could chew up your month's internet in a couple of days" if you don't mind, apologies if I am missing a reference here.
 
I don't know / can't remember many details. But I did help my Dad to disable as much of that stuff that I could find: when he "upgraded" to Win 10 his internet plan was 2 GB/month.
But I must admit I was including uploads & downloads (i.e., Windows updates) in that internet consumption. And maybe I was exaggerating a little...
 
7:13 PM
@roganjosh If you rip hard enough you can just put Linux on there ;)
 
taking RIP literally
 
laurel
 
stackoverflow.com/questions/3845423/… is this answer right? I mean filter(None, mylist) removes 0 from the list too.
 
But Dad was definitely furious about the internet consumption.
 
@WayneWerner You mean WSL? :P
 
7:15 PM
@VisheshMangla Yes, the default filter removes all "falsey" values.
 
@VisheshMangla 1. that's not a link to an answer, 2. what did the documentation tell you?
 
As the linked docs say, ". If function is None, the identity function is assumed, that is, all elements of iterable that are false are removed."
 
I did mean the most voted answer @AndrasDeak
 
@VisheshMangla Why wouldn't it be right? Over a thousand people have upvoted it, 646 thousand people have viewed that page, and a top Python coder with 236k rep polished up that answer a few months ago. OTOH, you shouldn't trust everything you read on the internet, especially when you can easily test it for youself in a matter of moments.
 
@VisheshMangla The OP is specifically trying to remove '' from a list of strings, so other Falsey values would not be relevant in the answer.
 
@PaulMcG Thanks, I overlooked "list of strings"
@PM2Ring thanks to you too
 
@MisterMiyagi PEP-8 has an opinion on this, as quoted here: stackoverflow.com/a/59186138/4014959
 
need your advice is this a valid comment to advice, may be subjective pertaining to different tags, how about overall ?
 
@anky that's not a comment link
 
@AndrasDeak Sorry Andras I dont know to share a comment link
 
Click on the timestamp
Even so; is this something we really need to give feedback on?
If you know your game then just pass on your wisdom :)
 
umm, yes i would like to actually, I mean generalizing
@roganjosh okay
I am learning moderating (advice on best practices is what I was looking for) and I am not quite old to SO,, hope you get my point
 
8:16 PM
I'm not a good person to answer because I yam off a lot of people asking questions recently. I still firmly believe that telling people they are on the wrong track is far more useful than just dancing around issues. "Moderating" is the job of the moderators
 
I agree , I meant moderating with the already existing privileges :)
 
@anky Your ability to comment was from 50 rep or something similar :P
 
Yup, 50
 
boom :P
 
okay I wouldn't argue on this.. may be I was unclear with what I was asking, or may be it didnt make sense at all .. may be the latter is correct :)
 
8:23 PM
I'd rather that you took a second go at explaining it than you keeping it to yourself, btw
 
Are there any meaningful operations in Python that are atomic wrt bytecode instructions? The only thing I can think about is a name lookup.
 
@roganjosh For every tag, does a frequent tab serve the purpose of learning or there are chances that they filled with dupe answers.. in general
 
@anky I personally don't think that SO is useful for learning Python (and its libraries), specifically, anymore
Actually, that's a lie
I used to follow the question feed, and learned from that. The historical answers still work
 
DRP
Hi Experts, need some insight on tkinter.
 
I am not a person who codes in my day to day work, the tad bit of knowledge I have is because of SO.. :)
 
DRP
8:33 PM
Basically what I have been researching so far, without exacltly nailing it,
is to be able to call a method of a class after the mainloop has started.
So as SO/SE many posts, mainloop blocks so not possible. I did overview:
update(),after(), update_idletasks(), but haven't found THE example..
Idea is to be able to send/ update information pertaining an object,
so a typical flow would be to click a button/combobox from gui
which would call a Class function to update an internal value.
Is there like a pattern for this? My eventbases mindset is too much JS
 
@DRP I'm not familiar with tkinter but normally buttons and whatnot have callbacks which are functions that get called when you interact with the given UI element. Is this the search keyword you're looking for?
 
@roganjosh It's pretty good to learn how not to do it... :P
 
I'm pretty sure JS has a similar concept, that of attaching code to be run when some kind of browser widget is clicked on. You may just not have made the connection that this is actually a kind of callback. In tkinter, this is exactly what you do - attach a method to be called when the widget is clicked on. NOTE: when you attach the callback, don't put the ()'s after it. You don't want to actually call it when you are defining the widget, you just attach the method to the widget.
 
@DRP The point of tkinter-like event loops is that the tasks inside the event loop call functions/methods. So if you want something to happen after starting the loop, you would submit a task for that before starting the loop or as part of the root task (or an ancestor of either).
 
The actual call will be done by tkinter when you click on the button or whatever.
 
8:42 PM
rbrb
 
DRP
@MisterMiyagi I think you nailed it, let me research on "task"
@PaulMcG thanks for chimming in, however in this case is more to the part that miyagi states. I totally get what you are saying.
 
@MisterMiyagi indeed :/
 
DRP
@AndrasDeak So around 14 links from SO/SE concerning mainloop and running methods, but they all are similar and not towards the flow I am thinking
btw this python chat is super responseive, kudos to everyone for that
 
I'm waiting for my Padawan to come smother me @MisterMiyagi. I'd like to think that I have some Python Foo to fire back at them, but it's not gonna avail me :P
 
@DRP I recommend that you look at a few good Tkinter answers on SO that have complete runnable programs. That will give you some ideas about how Tkinter code is usually structured. Play around with the code until you feel familiar with it. Since you're already familiar with event-based coding, it shouldn't take you long to get comfortable with Tkinter.
 
9:00 PM
stackoverflow.com/questions/63081026/… funniest question even seen by me on stackoverflow
 
@roganjosh I sense that the Python Foo is strong in this one! If you know the enemy and know yourself, you need not fear the result of a hundred code reviews. Be like water, my friend.
Wait, you don't actually have some Python Padawan trying to smother you, do you?
 
typo/non-existent problem (likely troll) stackoverflow.com/questions/63081026/…
I'm sure I saw that joke a few weeks ago
 
@AndrasDeak Yeah.
Jun 13 at 17:02, by PM 2Ring
@AnnZen The OP is a little confused. FWIW, many years ago, I used dialects of Basic where print printed to the screen, but lprint printed to paper.
 
good find
 
@MisterMiyagi Poop, I may have raised a spurious flag from mobile :/
Oh, no, we're good. I accidentally starred it </wipes brow>.
 
9:13 PM
One of the 1st Basic terminals I used was a paper-based one. There was no monitor, just a keyboard & a printer.
 
@MisterMiyagi I'm gonna don my detective hat and suggest that Padawans that want to smother you don't suggest that they want to smother you beforehand. Trade secrets right there
 
@roganjosh Well, they might just have some learning to do about announcing their attacks. Though admittedly, your detective hat makes for a very convincing argument.
Now I just need a Padawan to build an MCVE...
 
On smothering? <pensive face>
 
@roganjosh just remember to occupy the high ground
 
@AndrasDeak Anakin is indeed important here. We don't want the burny things
 

« first day (3569 days earlier)      last day (1378 days later) »