« first day (2800 days earlier)      last day (2373 days later) » 

00:00
Good idea. It needs getting rid of.
@PM2Ring TThank you by the way. I will check out the dis module.
@vaultah If you're still around, throw a DV on that, please.
Yep, done
Thanks, guys.
Woa _ctypes is not coded in C, but assembly. That was not mentioned
@Simon Nice. I guess that makes it easy to guarantee that byte alignment and padding gets done exactly tbe way you want.
00:25
Rbrb all.
 
1 hour later…
01:44
cbg
hello chat
02:12
i'm training a tensorflow cnn model, i have a img dataset about 160000img of 2000 characters; I only use two 3x3 convolution layer and one full connected layer, but the accuracy is very low... how to solve this...
hard to say without more information, is your learning rate wrong? Do you need more layers?
Who can say for sure
you're right...
I'm using this dataset: bcsiriuschen.github.io/CARC
I want to build an cnn that when it's done, if i put a img of one of those 2000 star into the cnn, then it will predict his/her name...
i just make the cnn also most the same as i train the mnist ... I just modified some parameter of convolution layers
2 conv. layers: change from (5x5+3x3) to (3x3+3x3), because my computer not that fast
i use softmax+cross entropy to calculate the loss, since for each img it only represent one movie star.
02:41
@user3483203 I wonder that since I use one-hot label of length 2000 for each img, is it still suitable for softmax-crossentropy?
 
1 hour later…
04:00
1
Q: wand.py strange behavior with gifs rescaling

MaxLunarI want to make script which liquid-rescales GIFs frame by frame, but I stuck into the problem. Every time it just distorts image, and it looks like previous frame isnt disposed. I used this answer as base for my script: In [19]: with Image() as result: ...: with Image(filename='file.gif'...

27 days, i'm not sure how do I bump it properly
04:14
@OlivierMelançon In reference to stackoverflow.com/questions/50884274/… we can do this without wildcards, we just need to generate all the corresponding keys. See my answer for a way to do that. ;)
@PM2Ring your suggestion for improving for Python 2 seems identical in both cases, I think you meant to change one :)
@user3483203 Indeed I did! :oops: Thanks for that. I would've noticed it, eventually. :D
I was about to just edit it, but I couldn't remember the name of Python 2 function :P
@MaxLunar Does it make a difference if you make a copy of each source frame and resize the copy? Sorry, I've used ImageMagick a little bit, but not for quite a while, and only from the command line. I can't recall it mangling GIF anims, OTOH, I normally use gifsicle for building my GIF anims.
I need CAS distorted gif image, but that initial frame shouldnt stay in it
04:26
recbg
@MartijnPieters wrong conference :F
it doesnt works well with gif compressed images
by default
it only processes the "change" layer, but not entire image frame
@MaxLunar All GIF images are compressed. But a GIF anim can be optimized: it can reuse pixels of the previous frame that are the same as the current frame. But not all GIF programs handle all of the optimation modes correctly. The error you're getting looks like it's being caused by a glitch with the very first frame, but I don't know how to get around that in ImageMagick.
I know you want to do this in memory, but if the tools you have aren't working you may need to resort to other tools. Split the source GIF using gifsicle, resize your frames one by one, build the new anim from the resized frames using gisicle. It will not fail.
would it work if I mix next frame with previous?
composite*
04:55
@MaxLunar Probably not. I can't test this myself since I don't have the wand module. As I said before, it looks like the cause of the problem is that the 1st frame of the output isn't correct. To debug this, try saving the output as separate images and check that each image is the size it should be, and it has been rescaled correctly.
thanks for the tip
05:27
I thought all programmers know what "bit" means. The following comment doesn't bode well when the OP is working with hardware that sends bit patterns, although to be fair it sounds like he's getting tuples of zeroes and ones.
@PM2Ring Could you please explain what you mean by bits? I'm not familiar with them unfortunately. The 0 and 1 are just an integer code that I set to make reading my data easier, if that is what you're asking. A dictionary entry such as (0,1,1,1,1) : 'A' would mean that I would be able to print 'A' when someone uses my program and displays a hand with only the thumb down. — Dan 2 hours ago
 
2 hours later…
08:15
recbg
 
1 hour later…
09:53
cbg
Is anyone able to create what I've observed in the comments of this question: stackoverflow.com/questions/50886683/…?
Surely that's a broken API if it can be recreated, or I'm going mad and imagining things. But now I can't recreate
10:14
@MaxLunar if you edit it it will bump to the front page. But asking here is fine too. If after multiple rounds nothing happens a bounty might help, but that's no guarantee either so I'd wait with that
@roganjosh I don't think I can repro from mobile; I'l try from desktop later
I'm not sure it can be reproduced to be fair. The question is now answered; the API is doing strange things. I've just never observed something like that before
The same request should presumably return the same response. But it's also in the domain of the weather... and there definitely isn't a hurricane heading our way... until it hits. I guess the API is at least consistent with its domain :P
@roganjosh I only clicked it once, but I got nice clean JSON.
Yeah, it's consistently giving me JSON now too
or no repro I guess but info is missing
@AndrasDeak Don't you mean "no repro" ? But I don't think we need to bother closing it, it's got an accepted answer the OP seems happy with.
10:25
What if the API creators come around and explain why it's not working consistently?
OP's happiness is irrelevant to me.
The OP isn't to know that it's an API problem. Maybe the question title should be edited to make it direct to that API?
@roganjosh there's no API in the question
As it stands it can't be answered
I'm saying that's not in the code in the way OP calls it
It's in the comments
I can hoist it up into the question and edit the title
Sure, then it'll be no repro :P
Remove all the fluff code while you're at it
10:28
Well you think it should be closed, so I'm not sure what is the right course of action
But the answer addresses the no repo side
This is not how I planned my Saturday morning :P I mean, I didn't plan it, but if I did, I wouldn't plan for decisions like this
You don't have to agree with me.
But the URL contains OP's API key
From wunderground.com/weather/api/d/terms.html "Weather Underground as part of The Weather Company, an IBM business [...] To improve our services and enhance our relationship with our users, we will no longer provide free weather API keys as part of our program".
So the OP is not only working with an inconsistent API but I've been consuming their requests to reproduce the issue. Bad day.
10:33
I tried using their internal search for API, but it just gave me the weather in a place named Api. :)
BTW I'm sure we can find malformed json dupes too
@roganjosh Don't be too worried about that. I suspect that historical weather data is cheaper than the fresh stuff. OTOH, the OP shouldn't expose their API key in public.
I mean bad day for them :) I've just resolved myself to leave the question be and actually I feel happier :)
I just flagged the comment with the API link for removal.
Editing the question also conflicts with my strong desire for a Full English
10:40
With a name like roganjosh you should be eating kitchari for breakfast. :)
It must be Python 2 day. I've answered 2 questions where the OP (allegedly) has to use Python 2.
@PM2Ring it's a simple chat handle. Coldspeed already exposed me as not even liking food with any kind of spice :P
@AndrasDeak I've just remembered I reproduced the link to the OP's API in chat with you. Please can you delete my message?
@roganjosh I was just being silly.
As am I :)
@AndrasDeak I didn't realise I was exposing their API key when I posted it sorry
@roganjosh already gone in comments and you only linked that
I flagged it for moderator attention to get it removed from chat. The link in my comment was the same as the one in the OP's question
It's gone now
I only reproduced their link here because it contained api in multiple places so it served a strong argument for saying "the OP is using an API" :P I just didn't realise that what they gave us was a personal API key
10:58
Hmm, I guess I missed it entirely
Oooh right
anyway it's OP's responsibility
Yeah, but I didn't want to reproduce their mistake. Anyway, time for food. rbrb for a bit :)
Brief cabbage all.
That was some pretty fast flag handling especially on a Saturday.
Perhaps a chat mod
11:13
(sowwy, that's what I can get to this year)
I just saw [1 if p == maxTP else 0 for p in tax_profit] in an answer. I guess it's more readable than [int(p == maxTP) for p in tax_profit]. It may even be faster, since it avoids performing a call on each iteration. But it still seems overly verbose to this old hacker.
the real question is whether a coercion to ints is necessary :) Odds are later only truthiness is used
@AndrasDeak Possibly. The OP wants to output a list of ints, but IMHO a list of bools would actually be more readable. stackoverflow.com/questions/50887066/…
rbrb. Dinner time.
rbrb, dog park time here
 
1 hour later…
12:42
@PM2Ring I agree it's probably better to generate the whole dict at that point. My getattr solution was mostly good when I thought OP wanted to chop the last digit when an item was not found, but it got less and less neat as it was mentionned that it was about wildcards and then that wildcards were dynamic
@OlivierMelançon I quite like your code. It's just a shame that it doesn't solve the OP's actual problem. :) But yeah, it can be hard when the OP doesn't know how to describe their task adequately. I often spend a lot of time trying to get the OP to clarify the question.
Sometimes it pays off, but at other times people just start guessing and posting answers. They may get lucky and post a good solution. Or they post code that works with the OP's sample input but breaks on real data, but their answer gets accepted anyway, since the OP doesn't understand that the solution is flawed.
@OlivierMelançon But on the topic of wildcards, check this out: stackoverflow.com/a/29867270/4014959
@PM2Ring If you want to have a look, it now works as requested by OP. I just went to sleep yesterday before OP added that the wildcards had to be dynamic. I honnestly would not use this kind of structure and try to think of a way to simplify my inputs if I was them, but since I was already half way down the hole, I updated it. Still, I agree that at this point your solution of generating the whole dict makes sense.
Nice answer with the Any object!
12:59
@OlivierMelançon Ok. As you say, it can get a bit slow, rebuilding the wildcard keys on every lookup, rather than doing it once when building the dict.
@OlivierMelançon Thanks. But some people didn't like it, I got 2 downvotes. I suppose I should give Any a __hash__ method, so it can be used in dicts and sets.
I don't know, some people do not like general solution on specific answers maybe... but you know some people don't like cute fluffy animals either... so you can't make everyone happy
I just went dupe hunting, found a good accepted answer on a 2 year old question, and then noticed I'd written that answer. :D
I saw that, I answered that question
And my answer is actually exactly yours... quoting the exact same lines of the doc
Great minds think alike. :)
:D
Hell is a a place identical to here... except for one small tiny detail: the interactive shell prints the None outputs
8
13:49
user image
3
 
1 hour later…
15:26
Nice :)
15:36
@shad0w_wa1k3r ✝_(º_º)
@MartijnPieters pycon uk was quite affordable in terms of price.
I couldn't find info about how long the tickets would be refundable
I was quite tempted to attend pycon uk, any feedback on previous editions?
IIRC at least @Ffisegydd attended one
16:09
@Aran-Fey I don't understand that smiley. Are you giving me a cross? Or is that a finger? :-p
I'm warding off your evil powers with a cross :P
ooh, don't worry, it's just 5 6s I have, not 6 6s. Else...
When you get 6 6s I'll start dual wielding crosses
Enemies of the heir beware...
huh, this is cool
>>> M = np.random.rand(3,3)
>>> d = np.diag(M)
>>> d.base is M
True
>>> d *= 2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: output array is read-only
>>> type(d)
<class 'numpy.ndarray'>
d is a numpy array by class but really it's a read-only view
a-ha!
>>> M.flags
  C_CONTIGUOUS : True
  F_CONTIGUOUS : False
  OWNDATA : True
  WRITEABLE : True
  ALIGNED : True
  WRITEBACKIFCOPY : False
  UPDATEIFCOPY : False
>>> d.flags
  C_CONTIGUOUS : False
  F_CONTIGUOUS : False
  OWNDATA : False
  WRITEABLE : False
  ALIGNED : True
  WRITEBACKIFCOPY : False
  UPDATEIFCOPY : False
>>> d.flags.writeable = True
>>> d *= 2
>>> M
array([[1.54625069, 0.38187951, 0.37914294],
       [0.38956359, 1.14446958, 0.37487271],
       [0.4412605 , 0.67325031, 1.50912634]])
OK, this is great
16:24
I just did a slightly odd thing: decorated __new__ with lru_cache. I guess there are legitimate uses for it, but I warned the OP that it's probably not a good idea to use it in real code, since instances won't get deleted unless you also clear the cache.
OTOH, that may not be an issue for the OP's class, since they probably only rarely want to delete the instances, so it doesn't really matter if they persist in memory. But if anyone has constructive criticism, please let me know. stackoverflow.com/questions/50889172/…
beyond the usual "don't write code on SO that shouldn't be put in prod"? :P
@AndrasDeak That reminds me of this peculiarity I saw.
In [62]: M = np.int_(1)

In [63]: M[...].flags
Out[63]:
  C_CONTIGUOUS : True
  F_CONTIGUOUS : True
  OWNDATA : False
  WRITEABLE : True
  ALIGNED : True
  WRITEBACKIFCOPY : False
  UPDATEIFCOPY : False

In [64]: M[...] = 0
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-64-7bdc41e675c4> in <module>()
----> 1 M[...] = 0

TypeError: 'numpy.int64' object does not support item assignment
well, that's a numpy scalar :) those are always weird to me
16:47
@miradulo actually, I found it in the docs: "However, array scalars are immutable, so none of the array scalar attributes are settable."
Yeah, I expected that. I just thought it was weird that M[...] is a view into.. not a scalar? Which is why WRITEABLE : True?
ah, I see, I didn't realize that
that may actually be a bug
because the setflags docs says
> The flag WRITEABLE can only be set to True if the array owns its own memory, or the ultimate owner of the memory exposes a writeable buffer interface, or is a string. (The exception for string is made so that unpickling can be done without copying memory.)
Ahh, I saw it shared in the xtensor Gitter but it looks like it's already been brought up as a potential bug.
perfect
There's a lot about NumPy I don't really understand :P
16:58
pv's remark there is amazing
>>> x = np.int_(1)
>>> x[...] = 2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'numpy.int64' object does not support item assignment
>>> x[...][...] = 2
>>> x
1
Still trying to wrap my head around this.
I still think it's a bug
mutating something to no avail should never happen :)
and writeable should be False for an immutable view. Then again seberg is right that this is not a view, since a[...].base is not a
Yeah, I agree. The kind of bug only a library implementer is likely to come across though at least :)
17:11
So M[...] is a non-owning view into the 0-D array underneath the array scalar I guess
Honestly I have no idea what it is :) Looks like something like that, but then it should not be writeable. We could then call it an immutable view (even though it isn't :P)
Semimutable view ;)
immutable pseudoview
17:56
I wonder how coldspeed is getting on... He does not seem to be around lately.
18:17
^^ thanks for that
19:02
Is there a good canonical post to explain relative path issues vis-a-vis the current working directory?
Preferably one that then uses __file__ to create absolute paths.
Ah, I think this one will do: stackoverflow.com/questions/4187300/…
hello
19:25
@Simon I appreciate your concern :)
Cabbage back. :)
How are you getting on with the rabbit rescue?
ah that was on wednesday. I got to hold them and play with them!
I also got to pet some of the guinea pigs
GP > rabbit
19:41
yeah because they make sounds as well
that is only an asset if you don't live with them ;)
haha. but geez they're cute
they had chinchillas too. those guys are nocturnal but one was awake and nibbling my finger
chinchilllas are weird, but they're cute when they're having sand baths
aww, sloppy-eared buns <3
19:48
That cage was in the way :(
Lop eared? Flop eared?
No wonder, there are bloody rags in the upper right corner indicating what happened to the previous curious person
Good question. They're categorised as "up-ears" and "down-ears" but I'm sure there's a better term
This is the one they assigned to me for playtime
Her name is Raven, she's 3 months old
looks like a killer
dunno about that but she pooped all over the place
20:14
If you haven't dealt with enough animals today, I can recommend some dragon egg shopping to relax with :)
I was just about to post that I'm dying here because of this imgur.com/gallery/kskWZz6
that's adorable
Hmmm... makes me wonder... what happens on windy days? Do their instincts kick in like that?
Good question. Perhaps they sit snuggly in their nests and only come out when there's no wind. Don't these guys live in tropic forests?
hmm, several species live in Eastern Australia
then I have no idea :)
Since it's Australia, I wouldn't be too suprised if windy days were equivalent to sugar glider rain. It would just be one of Australia's many curiosities
20:32
Since when are we posting pictures of snake food in here?
no, that's a food snake
21:22
@coldspeed Sorry I've been away, Wow I wish I could spend my wednesdays doing that :(
Anyway, nice pics, you are right, they look sooo cute. :D
both gone
21:37
now to go through my 0 vote crap and see what needs to be squished from there
user8177336
22:04
400 bounty on this: stackoverflow.com/questions/48798234/… ;). Bye everyone, see you on the other side!!!!!
user8177336
what was that @AndrasDeak?
nothing, I realized that I don't honestly care :P
it doesn't look like you're counting the extra day from leap years, and out of those how many or so ever leap years, 11 of them are sundays
(sorry)
user8177336
i've already figured it out. i just felt generous so i decided to give away a lot of reputation :)
you mean you realised you weren't counting the leap years?
user8177336
22:11
no. There are some more bugs after that too and I have alreadyy figured it out. I just felt like giving away reputation. @coldspeed
if you were feeling generous you should've instated a bounty for a good answer, not a crappy question
user8177336
i dont care. i asked that question when i had just started programming. so it is obviosuly crappy
yea... which is why I just said you could've put that to good use. But now it's too late. Well, we could no mcve, close and then delete if you want :)
we can't, bounty prevents that
user8177336
22:13
nah its aight. thanks tho brother @coldspeed
hmm, no mcve doesn't seem appropriate.... unclear maybe?
@AndrasDeak ah, didn't know that. I suppose deleting bounties is something only moderators can do
user8177336
Maybe @TheOneWhoMade will come back, answer the question, and recieve the bounty haha
yup, they can refund them and close the question
user8177336
@AndrasDeak no it's fine. thanks
user8177336
Buuuuut...if some moderator can unban me from asking questions, that would be great. (I have asked good questions since the time I joined except for one question, but for some reason I got banned from asking. No clue why)
22:16
deleted questions count too
user8177336
yes i know. I have deleted just one tho
And the exact mechanics of "good contributions" are intentionally vague. If the system won't let you ask, you need to do better. Every 6 months you get a question free.
user8177336
that sucks. how is a vague system supposed to control a huge site like SO. This make no sense. I have no questions with negative votes.
It's vague so that it's harder to game it.
user8177336
so there's not a way around it?
user8177336
22:19
i'll have to wait 6 months?
@BOi Nope. Use your 6-monthly free questions to ask good questions, and there's a chance that good answers help too (again, I don't know because vagueness)
user8177336
@AndrasDeak are you one of the moderators?
@BOi nope
I know what you're thinking, so: yes, they love it when they're harrassed for lifting question bans
well, I answered it
@BOi Moderators can't lift a question ban, sorry.
@BOi: all we can do is point you to meta.stackoverflow.com/questions/255583/…, nothing more.
Ah, I see you are just going to cut and run. Again.
22:36
What kinds of tools do moderators have to tell if two accounts are owned by the same person? Can you see their IP or something?
I'm pretty sure that's also not disclosed usually
I'd be surprised if it was that, because IPs can always change.
Mods have themselves admitted that IP bans have proved useless against trolls
depends on the troll
> Ah, I see you are just going to cut and run. Again.
So does this pretty much affirm our beliefs from day 1?
I'm not sure that's any of our business
23:02
k watevs. The question itself it's that bad so I took the liberty of editing it a bit. Should be a lot more useful and clear scoped now.
is not that bad*
23:40
damn it, I wrote continue instead of cycle in fortran and I had no idea why it kept working wrong (continue is basically pass) :|
well this will do wonders for the problem I've been debugging for an hour

« first day (2800 days earlier)      last day (2373 days later) »