« first day (1651 days earlier)      last day (3297 days later) » 

7:00 PM
Well a gaussian filter is (when making the bode plot) not really a binary plot (1 iff f < treshold, 0 otherwise) - Instead the bode plot is a parabolae. So while it does remove the higher frequences, it also reduces all other frequencies - quite a lot
 
if I remember my comp vision correctly, sinc is the mathematically ideal low pass
 
that's what it does
 
because it's the freq-domain repr. of a step function
 
@tzaman Only the summation of infinite syncs is
 
in frequency domain you could always zero everything outside a certain radius...
 
7:01 PM
@paul23 yes, so you want sinc instead of gaussian
 
but it will cause artefacts usually iirc
 
@paul23 sure, but you can use a reasonable approximation depending on your image and desired window size
usually you only need the first 3-4 terms to get something pretty good
 
@tzaman but my "image" is quite small - so because the signal is small there will be artefacts as the sync doesn't start near infinity
 
well you have to accept tradeoffs...
 
Hmm
I wonder then how a sync "kernel" would look like
 
7:02 PM
I'm woefully out of date on the literature but you can only do so much with what you have
 
back to the googling table it is
 
The graph on wiki shows one pretty well : en.wikipedia.org/wiki/Sinc_filter
 
Btw cosinc is typically used in data tranmission for above reason
 
there is a reason for using a gaussian filter
In signal processing, particularly digital image processing, ringing artifacts are artifacts that appear as spurious signals near sharp transitions in a signal. Visually, they appear as bands or "ghosts" near edges; audibly, they appear as "echos" near transients, particularly sounds from percussion instruments; most noticeable are the pre-echos. The term "ringing" is because the output signal oscillates at a fading rate around a sharp transition in the input, similar to a bell after being struck. As with other artifacts, their minimization is a criterion in filter design. == Introduction == The...
Main article: sinc filter
The Sine integral for positive values, exhibiting oscillation.

The central example, and often what is meant by "ringing artifacts", is the ideal (brick-wall) low-pass filter, the sinc filter. This has an oscillatory impulse response function, as illustrated above, and the step response – its integral, the Sine integral – thus also features oscillations, as illustrated at right.
 
@AnttiHaapala yepp. tradeoffs everywhere.
pick your poison
 
7:06 PM
Well take this data: imgur.com/ryyyfdo (It's a single column of the 2d image) - it should (physically) be a smooth curve with 2 maximums - so I wish to remove the noise
And am wondering which filtering method for the 2d image I should use
And more directly: wondering where I can post this question
 
Oh man. I'm very used to ringing artifacts :P
 
@paul23 ah so ringing artifacts do not matter there... EXCEPT...
again the curve might not be a summation of sines...?
so ymmv
 
@AnttiHaapala signal processing says that any curve can be written as a summation of sines, if you just take enough high order frequencies.
 
Writing comments and submitting them and deleting them and saying "forget it, I don't care that much". Must be 3:00.
#JustKevinThings
 
@paul23 haha I mean lowfreq sines there
 
7:17 PM
Hmm that is actually an interesting point
 
if you think it is, then sinc function works and works perfectly
after all it is the ideal low pass filter
 
What happens when someone gets his offensive comment flagged as offensive? What are the penalties he gets?
 
@AnttiHaapala Hmm guess you don't have an indication of how to apply a sinc filter to a 2d image?
*2d heightmap
 
You can get 2d versions of the sinc version.
I've never tried it though.
 
@paul23 I suggested dsp.stackexchange earlier for a better venue
 
7:23 PM
but it's in beta :(
 
And, in fact, I've never had to use a sinc function on my data :/ sinc function is simply something that happens to my data.
 
the only time I ever did this was on the Uni course
and back then I just did fft and drew the inverse circle ;)
MATLAB <3
 
For my PhD I have data which is finite, but theoretically it's assumed to be an infinite Fourer transformation. As my data is finite it's effectively like applying a step function, or low-pass filter, to it. As such when I make the FFT I get peaks with ringing on the edges, the effect of a sinc function.
 
And hah! When we learnt Fourier theory at uni, me and my friends had just taught ourselves this beautiful little language that had a scipy module :P I had other friends who didn't learn Python and so instead tried to write their own FFT routine in FORTRAN.
 
7:27 PM
isn't there already an FFT routine in FORTRAN?
BLAS, LAPACK, LINPACK, etc etc etc
 
Not in the stdlib.
And they didn't know about those :P
 
yeah but all the scientific math libs are BUILT in fortran
lol
that's too bad
i mean
I'm pretty sure even numpy/scipy etc. are calling fortran code somewhere down there
 
They are. There's C in there as well IIRC.
 
How do you usually feel when you answer easy give-me-tha-code question and get a bunch of upvotes?
 
Dirty, but then I count the rep and it makes the bad-bad go away.
 
7:32 PM
@vaultah like selling your body?
 
Yeah :(
 
:D don't get to use tee very often
 
wow... that was one hell of a day
cbg all
 
cbg @JonClements
 
Everything alright pup?
 
7:34 PM
@vaultah meh, I feel it's balanced by all the times you post an amazing answer with a lot of effort and get +0 or 1.. the whims of the voting public are mysterious
 
@Ffisegydd not great - but all sorted now mate
wait... wat? I missed @DSM trumping @Kevin on the starboard!?
 
@DSM has been dropping sick rhymes and dissing the Lounge<C++>
 
DSM is in good form today :-)
(Er, that's not meant as a back-handed compliment that implies that he's usually not in good form. Assume that I'm not trying to be cruel here)
 
I can only assume non-cruelty to fellow gravatars when my tea cannon is functional!
 
It is functional, for certain definitions of "is"
 
7:39 PM
oh okay... I can live with that I guess
in the mean time... I'm sticking with boiling water via the kettle and such, yeah?
 
hmm sinc filter doesn't work for my data (mainly because I only have around 100 datapoints in each dimension, and as such making a kernel of more than 5*5 remove a large portion already, the sync filter however doesn't work particularly well with onlya kernel of 5*5) thanks for suggestions btw
 
hey, can someone take a look at this, the OP is getting offensive
-1
Q: Millions of Google Searches/Day Python Script

user2255757Goal: 5+ Million Google searches per day with python script. Question: Is Google gonna get mad? cowers before the almighty company Optional Question: I looked for a search API, but the only one applicable (Google Search API) seems to have been deprecated last year. Any API you might recommend f...

 
flagged
 
flagged
downvote the q and will delv it
 
also cbg all, final number one at 1800...about half prepared :O
 
I saw meager getting in there! :D
 
dunno why meagar didn't delv it altogether
does not get more offtopic than that :D
still only 1 votes
 
Cannae vote D:
 
Thanks @AnttiHaapala, @Kevin, @Ffisegydd, and anyone else who just isn't chatty
 
omg that shitty question even has 1 upvote
"This question shows research effort; it is useful and clear" NOT!
 
7:53 PM
@paul23 Does it make sense at all to upsample your data (e.g. by linearly interpolating or similar) before filtering ?
that can help with the "not enough filter input" type problem
 
@Ffisegydd Then beat @davidism to 20k! Run forrest, run!
 
Thank you for that insight and wisdom Matthias. Last time I checked, Stack Overflow was a site for people to get help on programming topics, not get judged by other users. But thanks nonetheless for that. — Jasonca1 9 mins ago
 
@tzaman Might indeed be an idea.. Though that requires some extra focus.. I right now filter "everything" (I have about 100k frames). But I should be able to first focus on the more important frames and focus on that.
*and then focus on the filtering
 
Wow I really do like ggplot :/
I might even consider using it over matplotlib in the future.
 
oh well
not going to fix the indentation nor going to fix the question I guess, just smartassing about the purpose of stackoverflow
 
7:58 PM
"ability to use both American and British English spellings of aesthetics" FAVOURITE PACKAGE EVER.
 
@Ffisegydd I've been meaning to try Bokeh but I haven't had time yet
 
IMHO the American English spelling of aesthetics is not as aesthetic at all
 
this is still bugging (after nearly a year) - I know I've heard the backing previoiusly
especially the piano bit "dah duh dang" kind of thing
 
As an american, have literally never seen the spelling "Esthetic" before.
I know it's a big country, but that's a bit hard to believe.
 
I thought aesthetic and esthetic were two different words. Or something.
 
8:09 PM
nope
 
@Antti yup!? :p
 
Well they are now! Woo, descriptivism!
I declare "aesthetic" to be an adjective and "esthetic" to be a noun, and never the two may meet.
 
I wonder if it is a generation thing, like my grandmother used the traditional southern "catsup" but I learned in school "ketchup" - and haven't seen catsup used in anything southern or otherwise in the last decade or so
 
the esthetics of your prescription are not very aesthetic.
 
;-)
 
8:12 PM
Words get re-used, there was a huge debate on a radio program yesterday of the word "gay"
 
bike-curious
 
in the context of "oh - your car is so gay..." or something
 
Such a happy car
 
@Mitch exactly
 
@JGreenwell Garfield comics are probably the only place I remember seeing "catsup", and I thought it was a bad pun at the time
 
DSM
8:14 PM
I agree that "catsup" sounds like a word from another era to me.
 
I wonder if there's any historical precedence for pejorative words that later became neutral.
 
err, we've got the "N" word... that's precedent in rap music we can't use, but used to be used
 
Ideally it would be something from old timey times. I'm talking 2000 BCE - 1700 AD
 
Vandalism?
 
@Kevin Ahh... my young old days :p
 
DSM
8:17 PM
@Kevin: "Lutheran" underwent such an evolution.
 
Ok, "vandal" has moved along the "specific - general" gradient so it no longer specifically refers to a group of fifth century germanic people.
It's still a relatively negative thing to be called a "vandal"
Unless you happen to be part of a counterculture where disapproval from the authorities is cool
 
DSM
Which is a lot of them.
 
Yeah, man.
 
When I was young I remember "catsup" bottles (del monte I think) at the store
next to the standard ketchup
 
It's the kind of thing that an uptight provost from an 80's college movie would call the protagonists, only serving to make them more lovable.
 
DSM
8:20 PM
I used to get "catsup" and "catnip" confused, and so I wondered why cats liked ketchup so much.
 
Never enter a word into urbandictionary - the results are disturbing :(
 
DSM
"You spray-painted "Class of '83 Rules!" onto the statue of the founder of this university! You.. you.. vandals!"
 
any one knows how to to connect to MySQL with windows authentication?
 
Possibly while fiddling with his pocket square.
 
inb4 "Use Linux" by davidism.
 
8:23 PM
@DSM you have to be "PC" - that's a "graffiti artist" now...
 
this just got closed, opinions?
 
@tzaman way too broad for the site
 
It's kind of a bad question, but it does have an answer, so I don't think it's too broad.
Just not well asked.
 
yeah, I don't see how it's so egregiously offtopic
 
The key point is: "How would you write Python code to watch for the first occurrence of three matching numbers?"
 
DSM
8:27 PM
No, it's how would you write Python code. Weird use of italics.
 
Take out "you" and it works though. It's not an opinion based question, it's just dressed up like one.
 
no code - no input - no desired output - it's a write code for me request
 
@rodling it can be a process do you have the windows authentication plugin setup?\
 
oh beauty, for some reason that didnt come up in trusty google
 
the input and output are both well-defined imo
 
8:28 PM
@QuestionC the purpose of SO is to help fix code - not write something for them
 
@JGreenwell do you know if its compatible with py2exe by any chance?
 
and the ask is about approaches rather than 'gibe me codez'
 
@tzaman and that's off topic
 
@rodling nope, but I'd be surprised if it wasn't (being a native plugin)
 
@JonClements where would you send it? I disagree with Puzzles/Golf as suggested by a commenter. CS.SE?
 
8:32 PM
in its current state - it shouldn't be asked at all - can't think of a site it'd belong on
 
Really? I just don't see how it's so different from any number of other algorithm/data structure-related questions that get asked.
 
@JGreenwell sorry, let me rephrase the problem. MySQL already has windows authentication, I just dont know how to set up python to do so
 
but w/e
 
everyone has so much hate for mongo ._.
 
Nice day :I
 
8:35 PM
@corvid They just don't understand the webscaleness
 
@corvid I like Mongo
 
@vaultah yikes, how'd that happen?
 
I have webscaled into the endless eternity
 
@corvid make a startup for it :D tiffzhang.com/startup
 
@tzaman I just delete a lot of my own answers and answer bad questions like this (rude Kasra, off-topic shashank and a Russian with his pointless regexes)
I still need to get to 10k somehow someday
 
8:40 PM
you're really close :)
 
@corvid I don't hate mongo
mongo is special you know
 
If I have an async framework for api-call queues, and i want to keep alive multiple simultaneous connections to the SOAP service I'm calling, does each queue get a thread? Otherwise are the calls truly concurrent?
 
= retarded
@AutomaticStatic depends...
 
we're using celery for worker queues. I can open up to 10 simultaneous connections to the API I'm calling and make multiple requests while the connection is alive
does each connection just get its own queue?
 
8:55 PM
Thai food, followed by cigar bar where I had a wonderfully stout stout. It's a good Friday.
 
I just downvoted a question on Ask Ubuntu, and a little message popped up saying "consider leaving a comment too".
 
I bet you considered leaving a comment.
 
I did, and came to the normal conclusion: that I wouldn't.
 
But you certainly considered considering leaving a comment
 
Ask Ubuntu's python tag is a wasteland.
Same with Super User's.
I've answered one question on each site, because someone posted them here.
 
DSM
9:04 PM
I sometimes skim the Japanese SO's Python tag to see if there's anything worth wrestling with.
 
Is there?
 
DSM
Not so far. It's not very popular to begin with: see here.
On average a question a day or so?
 
Hey. Anyone know how I'd install distutils without a package manager?
For some reason it didn't come with python on OpenELEC
 
distutils is part of Python, it's not separate
 
ImportError: No module named distutils.util
 
DSM
9:14 PM
What version of Python are you running?
 
@DSM I saw there, but it's just a bunch of squiggles to me. I'll bet it gets more Ruby traffic (Ruby is a Japanese invention).
 
if you have some kind of stripped down python, you could either see if your OS pkg manager has python-distutils or just install a real python
 
@DSM 2.7.3
 
@BenFortune this may be relevant
 
@tzaman That's what I was thinking, but there's no package manager.
I'm running OpenELEC on a PI2
 
9:17 PM
so you'll need to compile your own python, since it looks like that distro is some stripped down version
 
Oh, there we go. Google translate fixed it for me. Not a lot of Ruby traffic there, either. Maybe just slightly above one a day.
 
Looks like it, thanks anyway
 
here's someone who proposes recompiling openelec without the exclusion
no easy option one way or another
 
user559633
how does the title "Foundations Aren’t Features: Paying Off Architectural Technical Debt" sound for a talk on how to replace an old crappy architecture with a new one?
 
It's weird, Openelec runs on a VFS
 
9:19 PM
@tristan sounds reasonable. the first thing I thought was "Foundations Aren't Features: stop FAFing about"
:D
 
user559633
haha, trying to be a bit more restrained than that
 
You can "install" packages without distutils, just need to append some custom location to your path. Of course distutils/easy_install is more complicated than that, so it won't work for everything.
 
it can be the implied subtitle ;)
 
user559633
@tzaman i initially thought "how to tell if the architecture is going to collapse and kill you" but figured i'd go higher brow
 
user559633
alternately: not up to code: replacing legacy architectures
 
9:21 PM
ooh, I like that.
 
user559633
which one, HTTITAIGTCAKY or NUTCRLA
 
"not up to code"
 
user559633
thanks
 
nice nod towards building codes
 
DSM
I'm coming in late, but "paying off architectural technical debt" didn't immediately make me think you were going to talk about "how to replace an old crappy architecture with a new one".
 
9:23 PM
and proper engineering etc.
 
user559633
:) cheers
 
user559633
and it has the double meaning
 
user559633
appreciated gents
 
yeah exactly
 
user559633
I'll share the slides when done and link to the talk after i give it
 
9:24 PM
sounds useful :) lookin forward to it
@ me when you link :)
 
user559633
definitely.
 
user559633
i wonder if they'll check my title or if i can get "dumb fat idiot" as my official billing
 
Hey guys, how would I call a method from a child class?
 
DSM
A parent method of the same name as a child method, do you mean?
 
super().method() then
 
user559633
9:30 PM
@HarryBeasant python 3?
 
Yes Python 3
 
Good :)
 
I have a class inside a class
 
user559633
And what sort of method? Does it require being bound to an object or is it static method?
 
And the parent class has a method I want to access from the child class
 
DSM
9:30 PM
Umm, wait. "class inside a class" and "parent/child" are very different things.
 
user559633
Wait...nested class or is the child inheriting from the "parent?"
 
user559633
@HarryBeasant I think you should post your code so we can help you.
 
DSM
@tristan: beat you. :-)
 
user559633
You always do.
 
Oh I mean a class inside a class
 
user559633
9:31 PM
I think it's because you're smarter than I am :/
 
user559633
@HarryBeasant yeah, post your code, i think we can really help you with a few things here.
 
Okay, just to note, I'm only playing around with Python, so im sure its really bad
 
user559633
There should be no shame in learning.
 
DSM
No worries. Everyone except for tristan was a beginner once.
 
user559633
Yes, I was born an intermediate Python programmer and will always be one.
 
9:34 PM
The main issue I am having is the scope between the App class and the http server handler
 
@HarryBeasant 2-space indentation is bad :p
 
Should it be 4?
 
yeah
 
user559633
Multiples of 4 will make other people happy, yes
 
DSM
And mixed indentation is right out.
 
user559633
9:35 PM
@HarryBeasant you can find some stylistic stuff here that's actually pretty important: python.org/dev/peps/pep-0008
 
Okay thank you
 
its only stylistically bad ... in terms of program function it is fine ... but yeah use 4
 
class App(object): can be class App: since you use py3k
 
Ah okay cool
 
user559633
(object) is now the default
 
9:37 PM
What's the main issue again? :D
 
user559633
And cool project btw, it's a neat ambitious thing to recreate a little Flask-like demo
 
DSM
I'm not immediately seeing why the handler class needed to be nested in the first place.
 
So basically I need to pass the path from the handler to the App class
But socketserver expects the handler to be a class
 
DSM
Other way 'round, no? You want to pass the path from App to the handler. Or am I misreading?
(I'm guessing based upon what super.request(self.path) might be trying to do.)
 
Well I can't access self.controller_func from inside the Handler class, so I need to somehow pass the path back into App so I can access it.
super.request(self.path) is trying to pass the path to the request method inside App
 
user559633
9:41 PM
pastebin.com/ySWPd1CP i wasn't sure what your decorator was supposed to do
 
DSM
Okay, well super isn't the way to go, because super walks up the inheritance chain. App isn't a parent of your Handler.
 
Thanks @trist
@tristan
 
user559633
np new buddy
 
user559633
You can press the up arrow to edit messages in chat
 
AH thanks :)
 
user559633
9:43 PM
:) np
 
Isn't handler inside App?
 
DSM
Note that tristan went the other direction, and made Handler a child of App, which is why he can use super. :-)
 
user559633
See how the indentation level has changed?
 
rhubarb all
 
user559633
Now, Handler isn't inside the namespace of App, so you can say super() (call the parent class) and then the request() which is bound
 
DSM
9:44 PM
rhubarb, v.
 
user559633
take care vaultah
 
Oh I see
 
DSM
OTOH the handler is no longer a subclass of SimpleHTTPRequestHandler, but tristan knows what's going on and I don't, so I don't know if that's important for anything yet to come.
 
I need to somehow pass "http.server.SimpleHTTPRequestHandler" into the Handler
 
DSM
ooh, spooky
 
9:48 PM
@ZeroPiraeus My question had tapered off to about 1 vote per day, then somewhere around 24 hours ago it got 30+ in the span of 2 hours, then 50 more overnight. I am really curious to see what link might turn up.
 
Lol
Yeah is there any way to pass App and http.server.SimpleHTTPRequestHandler into the class?
 
user559633
@HarryBeasant what do you have imagined for Handler and App objects?
 
Well I need that class to handle HTTP requests
 
user559633
what lead you to make them into different objects?
 
Can they be in the same object?
 
user559633
9:50 PM
sure, but app can do that. is your idea that you have one App with configuration details and multiple instantiations of Handlers?
 
user559633
@HarryBeasant Sure, why not?
 
Oh right
How would I do that?
 
user559633
stackoverflow.com/questions/10607621/… this seems to have an answer
 
user559633
you can adapt and build from there
 
Okay, so I keep it all inside App class?
 
DSM
10:06 PM
Friday rhubarb for all!
 
user559633
take care @DSM
 
user559633
@HarryBeasant sure. just make sure that when you add parent/child classes you do it for a reason
 
user559633
there's no need to make everything an object in python
 
10:48 PM
Had to mess around creating djangosnippets.org/snippets/10481 so I could easily access each select in a SelectDateWidget :(
/ cbg!
 
11:01 PM
Hey guys, how do I call upon a nested dictionary?
Anyone?
 
@PMARINA nested[first][second][etc]
 
@tzaman So say if my code looks like this:
a = {
b = {
darn, that didnt work
Student.Alice = {
Student.Alice.Math = {
'math1'= 100
'math2'= 98
'math3' = 89
'math4' = 91
'math5' = 77
'math6' = 90
'math7' = 82
'math8' = 100
'math9' = 79
'math10' = 100
}
Student.Alice.English = {
'english1' = 100
'english2' = 97
'english3' = 98
'english4' = 88
'english5' = 94
'english6' = 95
'english7' = 98
'english8' = 82
'english9' = 84
'english10' = 99
}
Student.Alice.Science = {
'science1' = 78
'science2' = 89
'science3' = 88
'science4' = 92
'science5' = 92
'science6' = 91
'science7' = 93
then how might I summon the value of science5
 
that's not how you declare nested dicts at all .. does that even run?
 
no, they are within brackets and indented
the dots dont do anything
 
even so
 
11:13 PM
like student.alice.french is part of student.alice
 
I've gotta run, post a question on the site
rbrb all
 
@tzaman cya, I prbly will post the question on the site
 

« first day (1651 days earlier)      last day (3297 days later) »