« first day (3888 days earlier)      last day (1069 days later) » 
00:00 - 20:0020:00 - 00:00

8:00 PM
Perhaps I am being too dismissive of your concerns about the messiness of your code. It's a good thing to have standards about that kind of thing. In the specific case of code cluttered with a lot of seq[i+1] - seq[i] index arirthmetic logic, I sympathize a lot. I try to avoid touching indexes whenever possible.
 
There might be better solutions to that problem, though. Such as building pairs.
 
@roganjosh strings within list can have duplicates, but i need them unique
 
But there are many alternatives you can attempt first before resorting to creating n variables. A lot of messy indexing logic can be eliminated with thoughtful use of list comprehensions, generators, itertools... That kind of thing.
 
@PIngu I really need an example at this point to understand what you're trying to do
 
Granted, most of those work better on lists than on dictionaries that have sequentially increasing integers as keys. I'm still not quite clear on why you're doing that.
 
8:02 PM
@Kevin i work with grammer, that involves that during the later part of analysis of word3 i am required to reinspect word2 and word4 to solve
 
Great, so write a generator that iterates over a sequence and yields (previous, current, next) triples
 
@roganjosh will pass it here if i could render a minimal
 
I think Kevin is onto something here. Generating dynamic variable names is almost always an XY problem. The correct solution depends on the original X you are trying to solve.
 
Ok, I've re-read in the context of your later messages. This is NLP?
 
@Kevin good, i though of that, but complexity in the language i work with sometimes require that i call objects two or three words down the list to effectively understand the context
 
8:05 PM
This reminds me of when I was talking with Raph the other day about bigrams... I wrote up this little snippet as a way of iterating through pairs or triples or n-ples
 
@PIngu Is there an upper bound to how much context is needed?
 
@roganjosh i find nltk so attached to english language, so the tools though efficient are not so in my particular case
 
@PIngu I don't know but why wouldn't a simple dict do? I mean it is there just for this type of reason where we can bind keys to areas in memory.
 
But you don't have to shuffle words with this, so it would be a case of using bigrams etc. as suggested? If you have "the" mentioned in multiple places, I don't see why they need to be distinct
 
@MisterMiyagi can't be, because i work with prehistoric literature; and user defined input. But we can arbitrarily assign it to the amount, a simple paragraph may hold, say 10
 
8:09 PM
nltk is absolutely not my area of experitise but it seems odd that you need a dict lookup for particular instances of words. What method is this?
 
@PIngu Also use dict. Dict are kind of replacement for structs.
 
@ShreyanAvigyan please read back through the discussion
@ShreyanAvigyan I've pretty much lost patience with you not following feedback, or making statements that aren't relevant to the discussion. I said 3 times this morning that the internet outage was due to Fastly and you kept pontificating on the cause. I will start kicking soon if you don't pay attention but keep making suggestions
 
@PIngu Then I really don't see an alternative to using a list/sequence of words. Whenever you want to go n positions ahead/along, you want indexing and thus a list.
 
@roganjosh I didn't say it was not Fastly fault. I said it can be a DNS problem in Fastly. And in this context I missed one message. I try to follow the discussion but I can't help if I miss only one message.
 
thanks everyone for participating, i will try and build a minimal soooner to depict a cleaner picture on the complexities involved
 
8:20 PM
@ShreyanAvigyan I don't believe you did. You continued to muse about the issue. In this context that has triggered my response; there is a whole discussion about why you might/might not want dicts and you turn up with "Also use dict. Dict are kind of replacement for structs." and "we can bind keys to areas in memory." That's not making an effort to consider the problem, it's for you to sound-off and sound knowledgeable
 
8:33 PM
@Kevin very economical, i am saving it to my list of code snippets for possible future usage prospects
en.wikipedia.org/wiki/Compound_(linguistics) for budding grammarians, this may throw some light, that is to say english is easily compounded and very direct in arriving at a meaning with very low reference to context
 
9:18 PM
@PIngu You're writing an LR3 parser? Anyway, can you post a reproducible example of your issue? Toy example is ok. Give us an idea what word2 word3 word4 could be?
 
Cabbage!
Hey guys
I am new here :)
 
cbg
 
9:35 PM
thanks for your interest
I am trying hard to make this look like domain independent problem, but i am repeatedly failing. Will come with a possible minimal update soon
 
What is the equivalent for ord("q") but not for pressing q but pressing ESC?
cv2.waitKey(int(1000 / FPS)) != ord('q'):
if ESC is pressed then break the loop.
or just change to 27?
 
Yup, just use 27
 
OK. But I love ord. :-)
DONE: ord('\u001B')
Thank you!
 
9:53 PM
Why :|
 
10:09 PM
@TheShortestMustacheTheorem Several of your questions recently are just dismissing advice you're given in response, in favour of your own preferences. That's sometimes fine, but what was the point of this problem if you're just going to break convention and do what you want anyway?
 
colab.research.google.com/drive/… hey @roganjosh, @smci and others
 
@roganjosh Not all suggestion are ignored. :-)
 
But this one was, so I'm not sure why you asked here when you were going to do what you wanted to anyway
You do realise that asking in this room takes time from others that are professionals, to consider your problem and give suggestions?
 
@roganjosh I do realize every action needs time even the light needs time to travel.
 
That makes no sense
 
10:21 PM
The point is we are here for discuss, chit chat, etc.
 
That wasn't my point; I'm saying that other people in this room have other things to do other than give advice. If you want to provoke a debate and discard that advice, that's not a good use of their time
 
For me it's not even about being ignored... it's about choosing the clearly worse option for no reason. ord('\u001B') is not fast, or readable, or short, or anything. It has literally no advantage over 27.
 
I am collecting as many infos as possible for teaching. Now, if my students ask how to use ord to capture ESC key, I have an answer.
 
Your students?
You're teaching Python with getters/setters (from our last discussion)?
 
Before teaching, I need preparation even before the students ask.
@roganjosh Not every question is related to teaching. Some about my learning.
@roganjosh: I think if you continue discussing about my "behaviour" here, you as a professional will waste more time. Thank you very much!
 
10:30 PM
Well, that's certainly a better reason than "I love ord". But still, I don't think it's a good idea to teach that to anyone. I hope you'll end your lesson with "Don't do this, though. Just use 27".
 
@TheShortestMustacheTheorem I'm a room owner and it is actually my responsibility to keep things on-track
Part of that is to make sure that regular contributors don't get their time wasted, otherwise there is no resource for you to question in the first place; they just won't be here
 
@PIngu Ok so you want to tag phrases/clauses/sentences by multiple words in their context, for information retrieval or summarization. This is what word-vectors already do. Look into packages like word2vec and PyTorch, look for tutorials. Among many other useful things they lemmatize words so 'hearts' -> 'heart', 'mingles/mingled/mingling' -> 'mingle'. Also they disambiguate verbs from nouns (e.g. 'set'), verb tenses e.g. 'Yesterday I read' (past) vs present/future.
In your case you say 'parse' but it's not like parsing a language grammar (y = (x-2)**3), more like 'sentence understanding'. Anyway there are heaps of tutorials, please go find a useful one. Let us know which one was good.
Here's one very simple tutorial, look for others: medium.com/@zafaralibagh6/…
 
10:53 PM
@smci very informative, but i don't work with english language grammer at all, and my bad that i didn't mention it in the link i provided. I will look up on the references you provided. Also training a language model will means, i am biting more than i could chew, at least for now. Someday sooner i may realize oh, this is what you were recommending, but would like to avoid for now.
 
11:13 PM
@PIngu Sure. Same goes for Tamil. Or Hindi, there should be tons of examples. Anyway, it's good to know about word2vec for your future, so you don't reinvent the wheel. Tagging sentences with multiple terms in (nested) dicts isn't scaleable and will be a pain to work with. Read a little about Information Retrieval, sentence understanding, summarization etc.
 
When talking about OpenCV, in my understanding, python version just wraps the C++ libraries.

I just found an weird thing:

cap.get(cv::CAP_PROP_FPS); in C++ always produces 0 that is wrong!

but

cap.get(cv2.CAP_PROP_FPS) produces 30 that is correct.


They are both run on the same machine and the same camera.
 
00:00 - 20:0020:00 - 00:00

« first day (3888 days earlier)      last day (1069 days later) »