you can go read about fancy indexing if you haven't done so already, although I usually find it very confusing and I end up testing each specific application when I have to...
but memory error can be due to matrix-multiplying a 10k-element column vector with a 10k-element row vector, producing a 10kx10k matrix, when you don't necessarily have to
in matlab we occasionally get questions like "How can I segment those grey speckles in the lower part of the liver from all angles", to which we like to reply "I know a friend whose PhD topic is this, good luck"
@vinita there are two types of handwriting recognition. on-line is, if the user writes to a tablet of some kind. that way you have samples ordered by the time they where written. Or offline which you have in your case. the text was allready written, so you only have pixels without knowing in which order they where produced.
is there something specific written inside those boxes? like single words out of a limited set of possible words? if so you could train a neural net to do so
i think you heavily underestimate how difficult this actually is. dont do that. for whatever reason you need such a software, just dont try to do it. because i assure you, you wont succeed. not in the next few month at least. if you are very smart, you might get some limited result after that time thoug. its not entirely impossible.
@MarioDekena Ive got another set of documents. These are "non handwritten"/typed, but have been scanned into images. Thus a little bit of noise due to scanning is there. Now is it possible to read text out of such an image.
@vinita its still not easy, but there are algorithms that do this quite reliable. its going to be hard to write such an algorithm by yourself, but you might find ready to use libraries for that.
@vinita google has a library for ocr named 'tesseract'. looks like there are python wrappers for it availble: pypi.python.org/pypi/pytesseract
@MarioDekena color is an array/list, so it's fancy indexing: colorspace[color] is colorspace[color[0]],colorspace[color[1]],colorspace[color[2]], so 3 matrices concatenated. What you need is basic indexing, with a tuple: colorspace[color[0],color[1],color[2]] which is the same as colorspace[tuple(color)]
i just have the problem, that i have assumed so many things in this algorithm that i have written all day without running it once. and now half of it could very well do something entirely different then i thought its doing :D :D
#helper function for re.match so I don't have to go to the trouble of assigning the result to a name every time, which can be a real drag especially when elbow-deep in an elif-block
last_match = None
def match(*args, **kargs):
global last_match
last_match = re.match(*args, **kargs)
return last_match
I have a little helper app which displays an image file and checks for updates every half a second, but it's very much a duct tape & twine solution
Windows Picture Viewer is supposed to auto-update, I think... But after failing to do so 10% of the time, I abandoned it. I don't need an extra layer of buggy code that can make my program seem to produce output it wasn't supposed to.
A 90% success rate sounds good right up until you spend thirty minutes combing through your code trying to figure out why the change you just made didn't have any visible effect on the output
simple_image_viewer.py has the advantage of having a running "{} seconds since a change was detected" counter on the bottom, so I can be damn sure whether it's frozen or summat
@MartijnPieters so, it indeed is like "fiucking(sic)s*tan", and as such, I think it is perfectly OK normal and professional conduct from a Finnish coder :d
Every python question is either closeable, numpy/pandas (don't know those), or answered within seconds by one of you :P
I can camp around some of the more obscure areas I have knowledge in (my highest-earning answers are semi-obscure git and systemd things) but those are more rare
My shopping is finished since Monday when I begged {relative} to pick up the last thing I needed from the mall since they were going to the mall anyway.
... Or at least I'm pretty sure they were going to the mall. If not, then the power of their love for me drove them to go to the mall just for my convenience, which I would feel slightly bad about so I choose not to believe that's what happened.
@ReutSharabani That's surprising to me. I was under the impression that a decorator could accept any object as an argument.
I probably wouldn't pass a generator to a decorator anyway, since it gets consumed after you run through it once, which is probably bad for a function you intend to call an indefinite number of times
I think you can. Some of the instructions are easily reversible, and for the ones that might not be (e.g. rotate based), you just follow all the branches.
Provided every 21.2 input has one solution, then eventually the field must narrow back down to 1, so the only question is how wide it gets at its worst point
I have 14 "rotate based on", so if there were only 2 possible progenitors for each state that's only 16k branches. If there were 3 there'd be ~5M. I guess I could actually turn my brain on and figure out how many there are. In fact I guess I could do it without using my brain just by brute-forcing each step. :-P
I went straight for the rainbow tables and got a decent place on global leaderboard part B , I didn't even make it on part A because of all the text parsing
remote work annoyance - not knowing when people are not around when there seems to be an active conversation going on slack....but it moves to the open area and you're waiting for people to reply
If I can find a way to do it without having to execute any arcane git commands and without having to execute some tedious step once for each source file, sure