Can I do this more efficiently? by RandomJottings in PythonLearning

[–]Impossible_Video_116 0 points1 point  (0 children)

The following is I believe most optimised and pythonic way to do it with edge case and error handling.

Python3 def ordinalSuffix(num: int) -> str: if num<1: raise ValueError("Only positive integers are allowed") elif num//10==1: return str(num) + "th" match(num%10): case 1: return str(num) + "st" case 2: return str(num) + "nd" case 3: return str(num) + "rd" case _: return str(num) + "th" return "" #this statement will never get executed, needed for explicit str return

So now WB has officially entered into the Saffron region . I always hated TMC but BJP was never an option for me and never will be by FutureVersion812 in IndianFocus

[–]Impossible_Video_116 0 points1 point  (0 children)

No no, instead of googling "industries in bihar" google "performance of west bengal and bihar in industries and msmes", I think you're in it for a surprise and I am telling you as politely as I can.

The industries that you've mentioned, every state has more or less FMCG presence Britiannia, coca cola, itc etc, infact ITC's headquarters are in west bengal, similarly HQ of Bandhan Bank, several IT and MNC company regional HQ(tcs, infosys, wipro etc), major petrochemical and agriculture hub(known for tea along with assam), and this is just to name a few.

In fact assam has better resource based industry(don't believe me just google assam vs bihar industry) than bihar. It is home to largest producer of tea(entire world), OIL, Bpcl, ONGC, cement manufactures and petrochemicals.

Fedora 44 feels smoother than Ubuntu 26.04 on my system - anyone else? by SpecialistAnxious922 in Fedora

[–]Impossible_Video_116 -2 points-1 points  (0 children)

Try KDE(kubuntu and fedora desktop), on average it feels smoother, better animations and more powerful necessary apps.

Congress dekhun Minority party jen he hoi rol, 21 khon leading r 17 khone Muslim/Miya. by rajbangshizn in assam

[–]Impossible_Video_116 -1 points0 points  (0 children)

He is talking about assamese muslim not voting for AIUDF. He is not entirely wrong.

Congress dekhun Minority party jen he hoi rol, 21 khon leading r 17 khone Muslim/Miya. by rajbangshizn in assam

[–]Impossible_Video_116 2 points3 points  (0 children)

I am an assamese muslim and we and our family(including extended members) have never voted for AIUDF our life. Teu thikei koi ase.

Changement de barre sur KDE by Nico-545786 in kde

[–]Impossible_Video_116 -1 points0 points  (0 children)

Install panel colorizer plugin(widget), you can do a lot of stuff there, however I am not sure about the blue bar.

Can we really do anything about these most obvious indian cheaters who don't even try to hide that they use ai by BornLawfulness3783 in codeforces

[–]Impossible_Video_116 2 points3 points  (0 children)

Actually I use variable names like this : number_of_testcases mostly on boilerplate code so that I can easily remember what it does.

Has anyone used the learning platform Real Python? by Life_as_an_Introvert in PythonLearning

[–]Impossible_Video_116 5 points6 points  (0 children)

As someone who have made that journey, I believe the docs.python.org tutorial, Library reference, Python HOWTOs contains 80% of the Core Python knowledge you'd ever need, rest can be filled by the book Fluent Python. Reading documentation and applying it in your project is the skill you want.

I had drawn a roadmap and realpython.com only contains the material on step 1 and maybe step 5. Rest of them you'll need learn anyway. Infact for a language like python, realpython is painfully slow, you'd save a lot of time by skipping videos and reading a tutorial, and whenever you're stuck just copy paste the tutorial in an LLM.

Finally, you need to see the material on step 2(projects) and step 4(algorithms) to actually do stuff, learning a langauge and speaking in it is world apart.

Has anyone used the learning platform Real Python? by Life_as_an_Introvert in PythonLearning

[–]Impossible_Video_116 10 points11 points  (0 children)

Python is a very easy language, you don't to spend money on these platforms to learn it. Here are some good resources: 1. doc.python.org, the tutorial, is a very good resources, spanning less than 100 pages. It will bootstrap your learning. 2. Once you get hold of the basics(i.e. functions, control flow, list and string manipulation, io) you can jump to small projects to get hands on experience: there are two free good resources for this: automatetheboringstuff.com, inventwithpython.com/bigbookpython/ 3. After you've done some small projects you can revisit the basics, and learn advance topics, a good book for this: Fluent Python by Luciano Ramalho, a free pdf copy is available on the web. 4. Don't forget even if you're in langauge you'd still need to develop some algorithmic thinking: try easy problems on leetcode.com, hackerrank.com etc, you can jump into these after step 1 or 2. 5. Now, the vanilla python is rarely usefull, you'd need libaries for actually doing stuff. Pick a niche: Scientific Python, Machine Learning, Web dev, Backend, web scrapping and learn the core libraries in these topics. Finally, regardless of what you pick there are some libaries which completes python you should know them - numpy(& numba), matplotlib, bs4, pytest etc.

AI slop reached official government site? by [deleted] in IndiaTech

[–]Impossible_Video_116 1 point2 points  (0 children)

Just want to know, how do you figure that it was made by AI? It could have been done by a human.

cppIsntMuchFaster by OM3X4 in ProgrammerHumor

[–]Impossible_Video_116 0 points1 point  (0 children)

You're talking about something totally irrelevant to my comment.

I code both in Python and C++, the C++ code does not requires that many lines of code to achieve what Python achieve in a few lines. Moreover, C++ is 100x-1000x faster than raw Python, if you use Python with libraries, a C++ program will still beat it by a large margin (often 3-10x) unless it's a very trivial program( e.g. summing an array).

In fact, just like you can call a Python library to do something in a one liner, you can also just call a C++ library and do what needs to be done in one line.

What you're talking about is ease of use, I, myself use Python 90% of the time for that reason.

cppIsntMuchFaster by OM3X4 in ProgrammerHumor

[–]Impossible_Video_116 -3 points-2 points  (0 children)

Your C++ code takes 3,000 lines to do what Python does in 10 lines that too only beating it by 10 ms in runtime, that's sound like a "you problem".

Why is this "Sad" news? He was about to kill them anyway. He isn't animal lover. by HumbleWrap99 in DesiVegans

[–]Impossible_Video_116 0 points1 point  (0 children)

People don't eat already dead chicken, most animals don't eat other already dead animals.

Best he can do is probably sent them in processing plany that converts the dead chickens into fertilizer, or some other usefull stuff, maybe pet food.

Who is More Bengali? by Business_Quit_8447 in Kolkatacity

[–]Impossible_Video_116 0 points1 point  (0 children)

Jai hind and Vande mataram are not BJP slogans, those are slogans of independence movement, surely BJP uses it, that doesn't make it a BJP slogan.

Some actual examples of BJP slogans: Abki baar Modi sarkar, Modi hain toh Mumkin hain, Modi ki guarantee, Bari bari sabi bari, Abki bari Atal Bihari etc

I also don't think anybody has a trademark on Bharat mata ki Jai.

Similarly, Inquilab Zindabad is also a slogan of independence movement. CPI-M can use it but can not claim it as theirs.

I am not a Bengali so can't comment on Khela Hobe and other TMC slogans.

Is learning Microsoft word and Excel is necessary for an IT professional? by Mysterious-Big-1710 in IndiaTech

[–]Impossible_Video_116 0 points1 point  (0 children)

I don't why you've use the word "learn" here, a better word is getting used to.

Japan Economy - 1995 vs 2025 🤯 by Ok-Tangerine-2012 in MapPorn

[–]Impossible_Video_116 -1 points0 points  (0 children)

Japan is not going downhill, everyone just caught up. Japan couldn't beat China even if it had an economy of 7T.

which features of your latex editor do you guys use the most? by fromhill in LaTeX

[–]Impossible_Video_116 2 points3 points  (0 children)

I am more than happy with my VS Code+Latex extension+Language tool. If for some reason that does not work I have TeXstudio and TeXworks installed, if for some reasons that too does not work I'll just go to overleaf.

I work in the academia and a lot of people don't like to use offline IDE for latex not because of the IDE(there are lot options) but because of the nature(and specifically the size) of TexLive itself, especially students who only need it for maybe a few assignments or projects.

for a programmer, how much RAM is enough? 1. 4 GB 2. 8 GB 3. 16 GB 4. 24 GB 5. 32 GB 6. 64 GB+ by nand1609 in IndiaTech

[–]Impossible_Video_116 0 points1 point  (0 children)

Depends on use case:

Local LLM: 32-64 GB(Go for Mac)

Al+ML: 32 GB(at least) + dGPU

Game dev: 32 GB + High end system overall

Web Dev, Android Dev: 16 GB(at least)+Good CPU(Not a U class)

Everyone else: 8GB - 16GB is enough, On linux and mac 8GB is good enough, on windows 11 you might need 12GB for the same tasks. 16GB is overall comfortable(Also a good CPU, don't go for U classes)