« first day (3294 days earlier)      last day (1867 days later) » 
02:00 - 21:0021:00 - 00:00

2:39 AM
verschlimmbessern: German for you were trying to fix something, but made it even worse!
The story of my life!
cabbage
jie
jie
3:38 AM
有人吗
wim
wim
4:36 AM
want to spend some downvotes or delvotes? pretty much everything here is junk, and a lot on page 1 too
 
3 hours later…
7:35 AM
Hello, yesteday evening I sent the following message: I was wondering if you could help me about urllib and sending files in a request object. I do not have any way to send it to another Flask server. Flask server expects the file inside the object "request.files", but the only way to send from a urllib client is in the "data" field (in the Request)
does anyone know how to send a file from urllib?
thank you ;)
Can't you use requests instead of urllib?
@Aran-Fey no, I can't
for the record, you should.
@ParitoshSingh how?
What do you mean how? requests is a library that is much more user friendly compared to urllib
Urllib might be more powerful in some sense, but you really don't need that level of control, and the abstraction provided by the requests library is worth it.
7:54 AM
request library is an unofficial library. Imagine that they close the project. I will not be able to get support or bug fixed
You can still start using urllib when that happens...
8:32 AM
hello guys
jie
jie
有人吗
jie
jie
晚上玩LOL哈
@jie 白菜好!
jie
jie
@AnttiHaapala 你是哪的
8:40 AM
t芬兰 :P
我是芬兰人
jie
jie
@AnttiHaapala u can speak chinese?
about that much :D
jie
jie
u had ever come china?
where city u had gone?
yep, I've visited Beijing, Shenzhen and Guangzhou
jie
jie
which city u had come?
i am in Shenzhen
8:45 AM
I did go for a short trip Hong Kong-Shenzhen-Guangzhou-Shenzhen-Honkong once, I did stay one night in Shenzhen, I was supposed to do a longer trip in China with my cousin but schedule changed so I was wandering alone there to justify me paying for my visa :D
jie
jie
u can come agagin when u have time.
let's see, it is really annoying for us Finns now
need to go to embassy to get a visa in person :/
we can go without visa to most countries and those that require visa mostly allow to do it online or at least through travel agency.
China is one country that requires to go to an embassy in person.
jie
jie
yep, china is very safe and need to check anything at Customs
"very safe" - that's one way of putting it I guess :p
jie
jie
very safe = 非常安全
8:55 AM
well, considering that Finns can show up about everywhere like "hello we just came here for a visit" but not in China then it is very safe in there :D
jie
jie
my english is not good, u can guess my means is ok
--
@jie your English is great - don't fret about it. You're doing a better job than some native speakers do
@Antti needs xref'ing or something, but edition.cnn.com/travel/article/…
and the most important thing is to try to use it and you will get even better.
jie
jie
just so-so
@JonClements the funny thing every year they publish several competing lists :D
Other indexes
Henley & Partner's list is one of several indexes created by financial firms to rank global passports according to the access they provide to their citizens.
The Henley Passport Index is based on data provided by the International Air Transport Authority (IATA) and covers 199 passports and 227 travel destinations. It is updated in real time throughout the year, as and when visa policy changes come into effect.
Arton Capital's Passport Index takes into consideration the passports of 193 United Nations member countries and six territories -- ROC Taiwan, Macau (SAR China), Hong K
they're mentioned there :P
9:02 AM
yup, and I could find many different sites with differing numbers/opinions :p
that's why I mentioned xref'ing :p
this for UK citizens now
pretty close to the Finnish list
@jie don't worry about it... I can't speak your language and you're doing a brilliant job of speaking "English" - welcome to the room
hmm Greendland is in wrong colour on the Finnish map
@AnttiHaapala all depends what happens I guess
most notably Finland has got some more VOAs in Asia it seems
jie
jie
9:06 AM
@JonClements thanks u encourage me ^-^.
@jie you're more than welcome... what I'd suggest though is to try and not use "text speak"... eg, actually use "you" instead of "u" ?
@AnttiHaapala Is that for Finland? What does it say for the UK?
jie
jie
ok, i am going to get off work soon, see you later.
@JonClements It looks to be the visa requirements for Chinese going abroad?
9:18 AM
@jie take care and good to see you around!
Anyone can get me some suggestions about live stream server arch in Python? Can I use flask to build it?
Flask can stream content but I know nothing of the scalability aspects. How many users?
For, now it may have 1w users, but to scale easily in the future, I want to know more about stream arch.
I'm assuming "stream arch" is "architecture" but you're not being very clear. What is "1w" as a quantity?
9:45 AM
I struggle to gauge pygame questions. I do enjoy reading about zombie dinosaurs that don't stop coming even when you shoot them in the face, but I think this question (no zombie dinos) is too broad/no MCVE and getting bad answers.
cabbage sinophiles and pythonistas
10:06 AM
@pakkk and you got some replies right after chat.stackoverflow.com/transcript/6?m=47643880#47643880
cbg
question popped in my head, are there any standard algorithms that are meant to map nearby numbers far apart in a reversible way
cant really think of a way to google this problem with a distinct enough label to give me results so im at a bit of an impasse
I'm not sure I understand the question; potentially the words you've used have a more definitive meaning mathematically than I'm reading
it's not really the purpose, but it's a side effect of most encryption algorithms
I think they need ^
Basically a reversible hash
ok, i was kind of thinking this might be a side effect of a reversible hash
but i wasnt quite sure if a hash was even technically allowed to be reversible
like calling a linear function non-linear
10:14 AM
Yeah, I'm not sure about terminology either. Most people won't assume reversibility if they hear "hash"
I guess one problem is the range. Can you tell how large numbers we're talking? And ints or floats?
and in the particular use case I was picturing I already had something like a nonce so symmetric key encrpytion can make a fair bit of sense actually
range is unsigned 0 to like 2^60
10:51 AM
@JonClements I see 3 maps :P UK, Finland, PRC.
@ReblochonMasque was going to doxx you as someone who might or might not be located in PRC ATM.
but I didn't :P
@Skyler I asked it before here and there is a term for it... and ... can't remember what it was
hmm did I ask it here...
@PM2Ring was it you with whom I discussed that problem ^
It sounds like one for PM 2Ring to answer if you did
Ha, Kevin'd
> question popped in my head, are there any standard algorithms that are meant to map nearby numbers far apart in a reversible way
@Skyler ah fermat!
Fermat's little theorem states that if p is a prime number, then for any integer a, the number ap − a is an integer multiple of p. In the notation of modular arithmetic, this is expressed as a p ≡ a ( mod p ) . {\displaystyle a^{p}\equiv a{\pmod {p}}.} For example, if a = 2 and p = 7, then 27 = 128, and 128 − 2 = 126 = 7 × 18 is an integer multiple of 7. If a is not divisible by p, Fermat's little...
that for example :P
you just need to find a prime p that is sufficiently close to the range you want,
you will get numbers in range 0 to p-1 and can map any numbers in this range.
ah no ... blah it didn't work that way :D
rsa.
I am reinventing rsa here it seems.
In number theory, Euler's theorem (also known as the Fermat–Euler theorem or Euler's totient theorem) states that if n and a are coprime positive integers, then a φ ( n ) ≡ 1 ( mod n ) {\displaystyle a^{\varphi (n)}\equiv 1{\pmod {n}}} where φ ( n ) {\displaystyle \varphi (n)} is Euler's totient function...
euler's theorem.
you can find any nice mapping there :P
and math.pow can be used to calculate
11:08 AM
@Skyler if the range is known, simply inverting the numbers (i.e. 103 -> 301) would get you very far
Well cyclically shifting everything by 2^59 would also do that. I bet they want something more "chaotic"
11:59 AM
Yes, thank you @AnttiHaapala :)
12:15 PM
@ReblochonMasque yw :d
cbg all
it looks harder than it is :D
you'll RSA encrypt your numbers :D
12:56 PM
Has anyone seen this question I'm not quite sure how I would go about judging that question (I don't know TF, so I will refrain from doing anything) but it seems to ask for links (so off-topic) but the other half seems like it may be a legitimate question. What do I do in a situation where half the question is off-topic but the other half isn't?
It's a recommendation for an off-site resource
first guy ive seen that says tf1 had something better :P what a mess.
Essentially, i read it like this: first, theres two questions in one question. 1 doesn't have enough information, and would require a lot of back and forth. the second is a request for a resource.
@roganjosh the first part, though unclear seems like an actual question that could be answered though
@ParitoshSingh Yeah usually as things progress they get better
take Python 2 and Python 3
I'll wager any amount that trying to get to the bottom of the first question will be fruitless
In case of tensorflow, the issue he's essentially struggling with is the fact that he's trying to find lower level features in a higher level new keras api.
1:02 PM
Not least because I also know that Spyder has wonky autocomplete processes, that are different between V3 and (beta) V4
So it's a close vote as off-topic/unclear?
I've VTC'd as a request for an off-site resource and I think that's justified. I wouldn't begrudge you trying to get to an answer, though
As I said, I know nothing about the subject, so I'm not going to do anything. I was reading the tags though. Does that mean Tensorflow2.0 is partly Keras in disguise
Well yesterdays webscraping project has gone downhill as soon as I discovered they are tracking input to the login sections
Now I'm not surprised the page takes 5 seconds to load, if it's sending a request backwards and forwards every time I click on the different fields
hello good work,
I have been working on python programming language for almost 1 year.
I have been working on django framework for 3 months.
Which database should I use for Django?
Which database should I find out?
Can you guide experienced friends?
I've not had much experience with web frameworks but from this page it seems it really comes down to what is easiest for you.
1:15 PM
@Simon that statement, while wrong, can be tricky to answer. It depends on what you think keras actually is. Is keras a library? And that's it?
@HibritUsta The database you use is mostly detached from the web framework
^
Sqlite is supposedly supported out of the box, but anything else you will need to get it separatly anyway. @HibritUsta
So it comes down to what the server supports, and which database feels the most comfortable
SQLite has royally annoyed me recently with Alembic migrations. That's 1 decision you might need to make early on
hi, does python store or save values to parameters? should we clear parameters like clc or something like that in matlab?
@ParitoshSingh Oh no, it's the Matrix all over again :p
1:20 PM
SQLite vs pretty-much-every-other-SQL-DB
@EnthusiasticEngineer What IDE are you using?
...
Please don't :P
You will want an actual IDE that is set up to help with Python indentation. Depending on what IDE you go with, it may come with IPython and have a global namespace like Matlab
it happened to me while I was running a script in abaqus, I have a parameter in for instance line 10 and i have used it in line 20, I have moved that parameter to line 50 and the code still worked!!!!!!!!!
I can not believe it!!!!
I thought there is a database that will work better with django.

Thank you for informing.
@roganjosh What should I use?
1:23 PM
@HibritUsta realistically you're probably looking at MYSQL or postgres, but you can use others
@EnthusiasticEngineer If you're coming from matlab then Spyder (which comes with Anaconda) might be most familiar. But there's also Pycharm and many others
I use Notepad++, and it's better than both Notepad and Microsoft Word, so it's got that going for it
Did you know: TAs really don't like it when you submit your code as a .doc
Just send a pdf then
I love Notepad++, but are you really developing Python code in it?
I am coding python....
I got afraid, I suddenly tought all the runs were made with the previous procedure...
Sorry, my question was to Kevin
1:27 PM
too odd for me
Save as pdf, print it out, photograph it, run it through ocr, convert to LaTeX, submit
@Kevin zOMG! I cannot support this enough. It's worse when they submit a doc/x renamed to a py, and vim shows you all sorts of mangled hex
@roganjosh Ignoring my impending philosophical crisis about what it really means to "develop" anything: yes
I'm sure it's purely coincidental that all my projects max out at 2000 lines before I get annoyed at the lack of organizational tools available to me
and one more thing
@roganjosh @EnthusiasticEngineer From trying both I prefered Spyder personally. It feels nice, but some things like variables I remember made it a bit broken, and for that reason it could be confusing if you don't know what you are doing. Pycharm ran very badly for me. For quick scripts by far the Python IDLE is the best, as it's fast and you can run it instantly
1:30 PM
anybody remembers my previous question here?
@Simon I should change my ide... I may look for a freeware of course. pycharm is not free as far as i know
@Simon It's not really broken, you just have to remember to dodge the spikey snake pit :P
This question? 99.999% of the time, you don't actually want to reduce the number of digits in your float, you just want to display fewer digits when you output the results
@Kevin exactly... I solved my problem with errors
>>> x = 12.3456789
>>> print(f"The value of x is: {x:.2f}")
The value of x is: 12.35
@roganjosh I remember talking about that with Andras Deak who made it sound like it was a "feature", since matlab (I think it was) used it
1:33 PM
speaking of IDEs, does anyone have suggestions for a lightweight editor for small scripts? I'm currently using Geany, but it's a bit annoying (bad autocompletion and stuff)
I mean the IDLE is as lightweight as you get, that's what I use :p
Notepad++ :>
@Aran-Fey I actually need auto completion since i have too many parameters i can not remember and n++ is very good at it
I should've mentioned it should be cross-platform
@Simon almost certainly Andras :P I'm not helping by lamenting some of its weirdness every so often and he tucks it away in his dossier against it :P
1:35 PM
neither IDLE nor notepad++ have a linux version, do they?
Yeah they do
I never figured out how to make Notepad++'s autocompletion suggest anything other than built-in functions, and I have a pretty good handle on those, so I just leave it disabled
@Kevin in my codes, i do not want to reduce the precision in prints, the problem was with the values which were going in to to calculations
At least the IDLE does @Aran-Fey
Does IDLE support tabs? (i.e. having multiple files open at the same time)
1:36 PM
No, but you can work around that :p
@Kevin and I solved my problem by decreasing the errors which were summing at each step... this really worked.
well that's a problem
typical windows software
Well, whatever works 👍
@Simon yeah, I'm gonna say "No" no IDLE, sorry :P
@Kevin I'm assuming this takes a few plugins to be workable?
1:50 PM
folks, we're currently considering to add Black as a hard requirement/commit hook for our public projects. Did anyone have negative experiences with it? Such as people angrily complaining in all caps that their carefully groomed PRs got mutilated?
I haven't got any plugins. I'm sure there are lots of "nice to have" features that I'm missing out on, but I don't think my productivity is harmed all that much by keeping things simple
data science question if anyone here knows - what is the difference between WCSS and Silhouette score when doing the elbow method for determining number of clusters in kmeans clustering?
remind me what WCSS is please?
variance, basically
minimising the square distance between points to their cluster representative
within cluster sum of squares
1:55 PM
silhouette: inter-cluster sparcity
WCSS: intra-cluster density
WCSS measures how tight the cluster is. Silhouette measures how far apart the clusters are
Ideally, you'd want tight clusters, separated by large distances. That's possible if you have separable data in your dataset. If your data is itself of high variance, then you might want to featureize it into a higher dimensional space to improve that separability
lower silhouette score means there's more overlap in the clusters
thanks, I got a bit confused because there was a post online where they said 'eblow method using silhouette score' blog.floydhub.com/… however that's not how I remember doing elbow method, I used WCSS to determine best number of clusters
i think the plot using Silhouette would be more like a knee?
elbow method seems to be a brute-force aproach to computing the ideal k for kMeans. Therefore, the quality of each k must be computed. The quality would ideally be a combination of both silhouette and WCSS, but could theoretically do your investigation with either one, depending on <reasons>
@MisterMiyagi Just embarking on this now with pyparsing. Fortunately my contributors group is sufficiently small that we can just collectively say "yeah, Black is a good idea, will help clean up some of this old crufty stuff Paul wrote 15 years ago", and I can say "That's okay, you didn't hurt my feelings - oh, by the way, we're going to just use the Black defaults, so no drawn-out arguments about single or double quotes." (even though single quotes are my personal preference)
@PaulMcG so no quote-shedding...
But I've heard that the default of using all double quotes can be contentious when introducing Black
2:09 PM
since you're talking about this: we're trying to get Black on our team here. The problem is that I disagree with pot_hole_casing and am in favor of camelCasing (for reasons pertaining to typing efficiency). Do you have any thoughts on this?
This is Python, so you are wrong
15
nobody understands slots so they just use __dict__ everywhere for everything, but people understand single quotes and double quotes, so they'll argue at length about it...
I say this having written pyparsing all in camelCase, learning Python after using Java for several years
I use camelCase in every language that doesn't have a strong style standard, but I use underscore_case in Python
2:11 PM
Now the wrong-casedness of pyparsing is a roadmap conversion task
The only hit to my productivity is that I can't code in the dark because I don't know where the underscore key is unless I can see it
@inspectorG4dget PEP 8 says use snakecase with the justification that it's easier for people to read, especially those for which English isn't their first language...
I'm considering getting a foot pedal peripheral that sends a "_" keystroke whenever I press on it
Also, snake_case is easier for those with visual disabilities
Are we really having this debate?
2:12 PM
personally i think moving a finger to the shift key to upper case is a waste of energy and time so everything should just be lowercase :)
@ReblochonMasque we're not debating, we're just arguing.
@PaulMcG I wouldn't say only for those with a disability, it's just easier to read
hahaha, go on then! :D
@Simon This was from a developer using verbal commands for code entry, I believe he is paralyzed or otherwise unable to use a manual keyboard
KevinScript solves the problem of "both camelCase and underscore_case require the use of the shift key" by allowing regular spaces in variable names
2:15 PM
@AaronHall perhaps, but it affects my coding speed, and I selfishly care about that more
Using all single-character variable names FTW!
Can they be upper and lower case?
Not in the same name
@inspectorG4dget shift requires a keypress too, doesn't it?
Nice dodge :)
2:21 PM
@AaronHall shift-nextChar is faster than shift-underscore-nextChar... at least for my fingers
I want to say it's not about speed, but then I think of some code streamers on twitch who are constantly deleting and retyping the same lines over and over... but you should be using code completion in that case and it shouldn't really matter.
but code completion doesn't work the first time I create a varname
The majority of my development cycle is spent drawing diagrams on cocktail napkins, so my typing speed has relatively little impact
ahh... to clarify, I'm talking about my code sprints, which to be fair are not super long. Most of my time is spent on waiting for db query results
I think on some level, I'd be ok with a linter turning my camelCase into snake_case
@Kevin that's exactly my thinking. you can hunt and peck when you've already written the correct program on a whiteboard and still be amazingly productive.
2:25 PM
I wonder if there are any linters that can invisibly transpile camelCase Python into snake_case Python and vice versa, when you push/pull from the remote repository
Every line of code you can see on your local machine is in your style of choice, but when it goes up into The Cloud, it magically becomes idiomatically styled
I should be able to write up an ast parser that renames variables. Add that to your CI/CD and a git pull/checkout hook... you should be good to go
@PaulMcG That's pretty much exactly the situation we're looking at as well. Thanks for sharing!
@Kevin I think that's the idea with Black
Ah, I was imagining a one way process
oh yeah, I guess by default it won't go back to your style unless you configure it as such...
sounds like a lot of work though
2:31 PM
needs sanity check: GIL affects CPU bound code more than it affects network bound, correct? If I want to download multiple files from a slow server, threading/GIL wouldn't slow me down.
I'm 70% sure that I/O read operations typically don't block the GIL
@inspectorG4dget yeah, but you can use async at that point...
@inspectorG4dget ✔️
I've never bothered to check but nobody's ever Well Actually'd me about it, so that's pretty good evidence
@inspectorG4dget the GIL is released on I/O wait
2:34 PM
many thanks, folks
@AaronHall zOMG! async with callbacks. Why didn't I think of that?! You're a genius
I use vanilla threading in our network I/O tests, and it works very well
@inspectorG4dget yeah, I don't see why not...
@inspectorG4dget please don't do async with callbacks! use async or callbacks. it's a mess otherwise.
@inspectorG4dget Using requests-futures will probably save time here
Actually, I've settled on multiprocessing.pool.ThreadPool, which despite its containment within mp, uses ordinary threading
2:37 PM
@MisterMiyagi I seem to fundamentally not understand async properly. Could you please elaborate?
Ooof, that is a tall order in chat.
David Beazley covers async in several of his YouTube presentations
@inspectorG4dget Same, I was trying to understand how to use async but never had the will power to finish reading it
would anyone be open to a gHangouts/zoom/blueJeans/whatsApp to discuss this? I will frantically Google his talkks
/me disappears for many moons
2:45 PM
I have a problem with my regex, I'm trying to remove all instance of \.br\ from my text

import re
t = "\.nf\REPORT\.br\\.br\SPINAL EXAMINATION REPORT\.br\Patient.bring"
print(t)
t = re.sub(r"\\\.br\\", " ", t)
print(t)
however the output is producing a weird result for the first \.br\

\.nf\REPORT .br\SPINAL EXAMINATION REPORT Patient.bring
if it's a static string you're trying to match, why not use string.replace instead?
@Arne this
lol I'm so dumb
ok
=D
I don't think either kind of replace can do overlapping replacements, though
2:48 PM
ok still I'd like to know why the regex isn't working
\.br\.br\ <- it matches exactly half of that and leaves the other half untouched
but in the original string there is a double slash, its not a single slash
his example isn't overlapping.
in that case your original string needs an r prefix.
yeah I'm looking at the text in the notepas++ and there are two slashes as I have copied into my string variable
2:49 PM
As a simpler example that doesn't complicate things with slashes, consider:
>>> "foo |a|a| bar".replace("|a|", "")
'foo a| bar'
Despite the string containing two instances of "|a|", the replacement only erases the first one
@Aran-Fey that.
oh I see like this?

t = r"\.nf\REPORT\.br\\.br\SPINAL EXAMINATION REPORT\.br\Patient.bring"
yeah
so r is like @ preceding a c# string?
Basically yeah
2:51 PM
cool thanks
wim
wim
3:23 PM
@MisterMiyagi I think commit hooks should be opt-in only, i.e. pre-commit. You could make black part of the PR builder, though, so that a build fails if black wants to reformat something.
And use the black defaults, don't compromise on line lengths or string normalization peeves. The whole point of the tool is to be unconfigurable, I don't know why those configuration options even exist in the first place.
Well "custom single style" also makes sense
wim
wim
Not really, if you're privy to the reason the tool is called black
user10984358
hey guys, is asking for a resource/tutorial suggestion related to python considered off topic in this room as well?
wim
wim
> Blackened code looks the same regardless of the project you're reading. Formatting becomes transparent after a while and you can focus on the content instead.
@TheNamesAlc No, it's not
3:27 PM
I guess they fear that uncompromising would keep away users
You could use a single custom style in a huge company and still benefit. Plus no bikeshedding.
user10984358
well good to know, is realpython.com/introduction-to-python-generators a good tutorial on generators or are there better ones I could find?
wim
wim
then people will bikeshed over the single custom style itself
@wim only if they are allowed :P
wim
wim
once you fully grok generators, graduate to dabeaz.com/coroutines
user10984358
I have never heard of that site, is it something I must have been aware of?
wim
wim
3:33 PM
probably
dabeaz = david beazley
user10984358
thanks for the links, the only "name" site in python I know is Ned Batchelder's
wim
wim
Ned is great too
they are both excellent developers and excellent teachers
...there is such a thing as fully grokking generators? Even including the send()?
wim
wim
yes, do the dabeaz tutorial. there is even a specific section about send and what you might use it for (a "push" pipeline vs a "pull" pipeline)
Raymond Hettinger is another well-informed and easily watchable presenter
3:36 PM
@Aran-Fey I thought I understood send, but if you don't then probably neither do I
I think once you add send() to the mix, you are already down the slippery coroutine slope
^^ that's what I thought... now I have to go fight off my ignorance
wim
wim
I sometimes find Raymond's talks a little tedious or patronizing, can't quite put my finger on it.
I mean, I can probably write code that uses send() without crashing, but I wouldn't say I fully grok it
it still feels unintuitive and like it should best be avoided
I would say I understand the building blocks, I just wouldn't be able to build something complex
wim
wim
3:39 PM
mixing sent values (i.e. assigning to the yield) and yielded values in the same generator is the slippery slope
The whole coroutine approach is alien to me
@PaulMcG I think you're the second person who has said this about RH. I found his delivery excruciating painful. Similarly, when Jon Skeet pulled out the finger puppets in one of his presentations, I couldn't stick with it
We've had to do some co-routine stuff for AoC and I always just manage to cobble something together that works
wim
wim
but there are neat use cases for a generator which only receives values (always pausing by yielding None)
@wim you mean only val = yield, right?
wim
wim
3:46 PM
Yes
@Aran-Fey what helped me was to think of __next__() strictly as a shorthand for send(None). That avoids some common pitfalls such as calling next after send and wondering why there is a value missing.
implementing your own event loop is also liberating. :D
wim
wim
Yielding values is like a one-way communication (with next “pulling”)
Assigning to the yield is like a one way communication (with send “pushing”)
wtf is send()?
generators and coroutines have a send method
wim
wim
Doing both in the same generator is confusing and bad - you should be using async def instead.
3:50 PM
the argument of send becomes the value of the generator's currently suspended yield expression.
wim
wim
I’m on iphone and can’t find the backtick so sorry for lack of code formatting
@roganjosh He can get full of himself in some talks, but get past that for some really interesting insights. In his Pycon2016 talk, he gives a good rationale for '__' names, much better than trying to apply Java or C++ like public/private-ness
wim
wim
@roganjosh ..finger puppets?!
on your head, be it. I'll try a few more talks :)
@wim Sock puppets, sorry. But yeah, in a full auditorium he has sock puppets talking to one another
wim
wim
4:13 PM
Did a lot of people walk out?
No, cos it's Jon Skeet. I just didn't get it. I don't think I'm particularly good at paying attention when I feel like someone is patronising the hell out of me, regardless of how much they know
4:27 PM
I wonder if implementing an external API (imgur, google drive, stuff like that) always includes so much trial and error or if that's just me
> Multiple files can be uploaded, using POST with multipart/form-data encoding. If passed by POST, the parameters must come before files. All files are accepted, the name of the form field is ignored. Multiple files can come one or more HTML file controls. Filenames must be passed as filename property of each file, that is - the way browsers send the file names.
uh-huh
@PaulMcG oh, i'd love to see this
@Aran-Fey you mean using an API, right?
I guess
I guess it boils down to how good the documentation is
the SO API seemed pretty decent, then again it has to support a relatively limited kind of interactions
maybe I should read up on how exactly HTTP works, but as far as I can tell the docs are generally pretty bad
4:36 PM
@Simon haha, i guess the main trick is in knowing that keras is actually an API specification for ML models. It's just a set of guidelines on how an API layer should be interacting with underlying models. So, as such, tensorflow having keras is simply the same as tensorflow having a high level API for use. Keras the library used Keras the api spec to target different machine learning libraries in the backend, such as theano or tensorflow, depending on what you chose.
Tensorflow took a cue from the success of keras the library, and decided to more tightly integrate keras the api spec with tensorflow itself.
@ParitoshSingh I got the year wrong, it was 2012 - youtu.be/miGolgp9xq8?t=2079
Thanks a bunch!
4:53 PM
Hello guys. Could somebody tell me if there's a way to connect to my local mysql database from my mobile?

Already googled it with no luck
Gosh darn it haha
You got me, you got me good. my brain went "whattttt" and the rest is history.
Thanks @ParitoshSingh you have validated my poor behavior (-:
user10984358
I dont even know/use numpy enough to know what broadcasting is, but I still clicked on it :)
cbg all
back to labview for me for the next few weeks XD
5:34 PM
As far as I can tell everyone is using mypy and nobody (aside from Facebook) is using pyre, amiright?
5:45 PM
@piRSquared troll!
my most humble apology... I will feed elsewhere (-:
I've noticed a non-trivial increase in the number of people who use emoticons facing "the other way". Is there some pop culture trope that I am not yet aware of?
m8_
m8_
Afternoon all. I'm trying to read multiple csv files and write to one, while adding a FileName column to identify the source file for each row (pastebin.com/qNaFxkHE).
My script almost works, but it's reading in the added FileName header for the second file, instead of the actual filename.
Does anyone mind taking a look?
@inspectorG4dget I use it because I want an emoticon and not a hijacked emoji
aha! that makes sense
@wim From the Black docs, they recommend pre-commit hooks also: black.readthedocs.io/en/stable/version_control_integration.html
wim
wim
interesting.
mister miyagi wasn't really clear if he was talking about pre-receive, post-commit, or post-receive
Personally, if my name is gonna show up on a git blame it had better be the code exactly as I wrote it in my editor. The only thing I use pre-commit hooks for is to block a commit. Of course opinions differ here
@inspectorG4dget readability trumps typing efficiency. snake_case is just much easier to read.
optimizing for typing efficiency will just give you variable names like a.
6:27 PM
I'm gonna have to agree with that.
6:39 PM
@m8_ "it's reading in the added FileName header for the second file". Well, isn't that what you're telling it to do? row.append('FileName') will add that header to the first row from each file. If you only want the header to get written exactly once, then don't append it in every iteration of the loop.
I'm thinking something like pastebin.com/rMz3mQb9
The output doesn't look exactly right on my machine since it mixes space delimited data and comma delimited, but at least the header is showing up on the right line
How do I create a hyperlink to another sheet in Excel?
@wim sigh... I can definitely see how that would be the case in a large team with varying language-proficiency levels. Still bothers me... I'm just gonna go scream into a mason jar now
@wim I'm sure you could write a precommit hook that would reject if any changes were made, or make you approve the changes before committing?
wim
wim
@toonarmycaptain yes, which is what is being recommended there.
good questions to ask yourself for for understanding how coros are built on generators a little deeper
0. why do we have `yield from thing` in the language? isn't that just another way of doing the same `for x in thing: yield x`?
1. why do we have `GeneratorExit` in the language? what's wrong with `StopIteration`?
2. why do we have three different things gen.send, gen.throw, gen.close ??
m8_
m8_
7:20 PM
@Kevin, ah I see...thanks!
 
2 hours later…
8:57 PM
@toonarmycaptain the advanced question is why we have the coro tshi.
02:00 - 21:0021:00 - 00:00

« first day (3294 days earlier)      last day (1867 days later) »