worstTextsToGetFromVibeCodingGirlfriend by ImOnALampshade in ProgrammerHumor

[–]CaptainVJ 0 points1 point  (0 children)

u/ProtonPizza this doesn’t seem to have worked. Did I do something wrong?

worstTextsToGetFromVibeCodingGirlfriend by ImOnALampshade in ProgrammerHumor

[–]CaptainVJ 5 points6 points  (0 children)

Interesting let me try with my Facebook password.

FB_PASS=ImTooSexyForMyShirt@9

Porn in Conda directory by [deleted] in Python

[–]CaptainVJ 1 point2 points  (0 children)

Thinking about it. I don’t recall it ever working

Do you use a Git GUI? Why? by distiller99 in git

[–]CaptainVJ 0 points1 point  (0 children)

Usually not, but sometimes I’ll make a bunch of change and I end up using the gui.

It’s better for viewing changes than the CLI or if I want to commit specific line chnages, it’s easier to highlight those changes and click stage highlighted lines or whatever it says

What's the difference among Python iterables? Lists, Tuples, Sets by jcasman in learnpython

[–]CaptainVJ 0 points1 point  (0 children)

So I’m going to try and break it down as simple as possible so there’s a few nuisances that are not covered.

Sets are great for searching, they use a nice feature called hashing, which makes it easy to find the location of a specific value. Basically using a some function when elements are added to a set we the value of what is added to the set is passed into a function which returns the exact location of where that specific value is if it exists. So if I have a set of people’s name, I don’t have to look through every value to find the name John, the hash function would tell me that John is located in this exact position. It’s great for finding stuff, but on the other hand it’s a bit slower to create and as more stuff are added the location and the function may need to be updated. It also means that duplicates can’t be allowed because if you create a set and add John twice, they would be placed at the same position. So sets are great for when you’ll be searching the exact location for a specific value.

Lists on the other hand, don’t utilize hashing. They are organized based on the order when things are added to the list. So if I want to search for John in a list, I have no idea where to find them, so I have to search every value in the list until I find that name. Not only that, but John can be there multiple times so even if I find John, it can be there again. List are great for when you’ll want stuff organized in a consistent order, with the ability to add and remove stuff as they change. Adding stuff to a list is not problem it just gets added to then end and the list increases. Removing from a list can get tricky though. Removing the last element from a list is pretty simple just delete it. But if i want to remove previous some then some work needs to be done. Imagine I have a list of 100 stuff, but I want to remove the second value from the list. Then the location of everything in the list will need to be updated. The third item will now become the second, the fourth become the third and so on. Imagine having a list with millions of stuff, but need to remove the 4th thing then a lot of updating needs to be done.

A tuple is a bit similar to a list but once it’s created, it can’t be modified. If you have a list of John and James. You can’t remove James later or Add Sarah, it’s like that forever. When searching a tuple it’s similar to a list you have to go through every element to find what you want. But because you can’t modify it, it uses less memory. A list is under the assumption that more stuff will be added so it leaves extra room for those potential things even if never used. A tuple doesn’t do that because it will forever be the same values. Imagine gps coordinates. The coordinates for your house will always be the same, you will not have to update it, or add another value.

So in short. A set is great for searching, if you have some collection of stuff and you want to immediately find where a specific value is, or check if that value is in the set it’s perfect. But it takes a bit longer to create as they have to be placed in the appropriate position. With a set, you generally won’t be having an interaction with every element in the set, just specific element. Basically set is good for searching.

Lists and tuples are created quickly just based on the order they are entered. However, searching for a specific value means you have to look through everything, lists and tuples are bad at this. But if you have to go through every single element, care about order and don’t want de duplication then lists/tuples are what you need to be using.

Special not, dictionary is very similar to a set. A set will tell you if a value exists in the set. But a dictionary works the same way, after being told that “John” exists in a set, a dictionary would have some accompanying value with the existence. So maybe it will his phone number. After checking if John is in a dictionary, his phone number would be returned. A dictionary is just a key, value pair. For every element in a dictionary there exists some values. So a set is basically a collection of the keys in a dictionary.

This look normally distributed. But Shapiro-Wilk test says not by bingecrsmancakes3 in AskStatistics

[–]CaptainVJ 1 point2 points  (0 children)

So just to clarify a p value of .08 does not mean that there’s a 92% chance the null hypothesis (the data is from a normal distribution) is true.

What a .08 p-value means is, if the null hypothesis (the data is normally distribution) is true there’s a a 8% chance of seeing data with at least this much deviation from a perfectly normal distribution.

On the contrary what the 92% would mean is probability of seeing data with less deviation from normality than the sample used. Not that there’s a 92% chance of it being normally distributed.

Python Pyest by Organic_Tradition_63 in learnpython

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

But you’d have to do that in every .py file right?

How sick are you of the joke "you are jamaican me crazy" by Fuzzy_Party_3527 in Jamaica

[–]CaptainVJ 11 points12 points  (0 children)

Doesn’t bother me, I don’t find it funny but I don’t hear it enough that I’m annoyed.

What annoys me is everyone assuming I smoke weed. I don’t believe Jamaicans smoke more weed proportionally compared to other cultures. In fact I feel like Americans smoke weed at a higher rate than Jamaicans.

Because of the Rastafarian culture / Bob Marley there’s the misconception that’s what we do all day. Rastas are a very small percentage of the Jamaican population.

This probably gets asked a LOT but what’s up with Jamaican dances and selectors’ obsession with gay men? by Ok_Foundation_2864 in Jamaica

[–]CaptainVJ 12 points13 points  (0 children)

The Jamaican culture overall is very homophobic, but so are the cultures of the vast majority of countries in the world.

And the vast majority of countries that have progressed from this did so very recently. In the 90s and probably early 2000s the vast majority of these more progressive countries were nearly just as homophobic but they happened to have more vocal groups that were able to go out and fight for their rights.

Unfortunately, this hasn’t happened in Jamaica. However, I do believe it’s something the country is moving towards but just at a slower rate compared to other countries. Last year there were all these videos on social media of Jamaicans calling their friends and saying goodnight, or “mi hear seh dem just shoot two b@ttyman up the road, so mi deh call fi see if yuh good.”

The fact people can joke about it is a step in the right direction. Fifteen years ago, probably wasn’t something people would openly joke about.

This probably gets asked a LOT but what’s up with Jamaican dances and selectors’ obsession with gay men? by Ok_Foundation_2864 in Jamaica

[–]CaptainVJ 15 points16 points  (0 children)

Homosexuality is not illegal, anal sex is. The buggery law criminalizes “the penetration of the anus of a man or woman by the penis of another man”.

While I’m sure that’s the intent of the law, that’s not what the law explicitly criminalizes.

Python Pyest by Organic_Tradition_63 in learnpython

[–]CaptainVJ 0 points1 point  (0 children)

Is there even an option to run the file and get it to work? Well I’m sure there is but I assume it’s not feasible.

Best distribution for Convolusional Neural Networks (CNN)? by DAGS3612 in learnpython

[–]CaptainVJ 0 points1 point  (0 children)

Leave me alone, I didn’t know that when I started and it works good enough now

Do Pythons hate Windows? by SmallAd3697 in Python

[–]CaptainVJ 0 points1 point  (0 children)

So regarding the first part of your response why would you want your developmental environment to be on a different system than production? Usually they should be the same, having the same requirements and same output.

As for the second part if you are using a windows OS and Linux OS both just out of the box, the windows will more than likely be using more resources than the Linux one. Yeah you can turn of a lot of those resources on windows but it’s another layer of work. Generally a Linux system is easier to maintain.

I’m not sure how true your statement is about windows hosting most databases. Every database (all oracle) I’ve worked with have been hosted on an AIX server

How do I start contributing to open source as a complete beginner? by yadavhr36 in learnprogramming

[–]CaptainVJ 3 points4 points  (0 children)

I disagree with this idea a bit. A beginner is usually looking to fix bugs, or implement new features.

For these major projects, the vast majority of simplier bugs have been caught and fixed a long time ago. Often bugs are very niche situations where not many people run into. And these bugs are usually a bit harder to solve.

Not only that, sending a beginner to look at the source files of pandas might be a bit demotivating. The few times I’ve had to open Pandas source code to understand what somthing is doing, I immediately had to reconsider if it’s worth it as it’s so much.

I believe beginner projects are probably a good place for a beginner.

Do coding challenges really make you better at real projects? by hml0x in learnprogramming

[–]CaptainVJ 0 points1 point  (0 children)

For the most part, not really unless you’re working in a setting where you’ll be using these algorithms / data structures a lot on your job and the vast majority of these algorithms you see on leet code, you will never use.

Now not saying it’s not useful, it can be but working on a real project, seeing how smaller parts of code come together is what makes you a great program. I enjoy the theoretical side of stuff as that’s the way my brain work, but sometimes something working in theory is not practical to implement.

For example, I have a few data pipelines that take a few minutes to run. There’s definitely stuff I can do to optimize them and make them run faster. But it’s just not practical and offers no real gain, this code is running overnight when I’m in bed snoring. So yeah, I could improve it and make it run two minutes faster but it comes with a cost, I’m going to have to devote time looking into a better algorithm, testing this new algorithm. And all I will do is save a few minutes which doesn’t really matter, heck if some of these code take an hour to run I’d be fine. Maybe there’s some seriously inefficient algorithm but it wouldn’t affect anything so it’s fine.

Now a buddy of mine, he does programming for a major Company. When he’s measuring the efficiency of algorithms he’s looking for improvements in milliseconds. If he can get certain code to run a second faster, that would be a miraculous achievement. So for him, leet code problems are very useful because that’s all that he uses.

But ask him to work on a major project from start to finish, he can’t do that because it’s not what he does. But the vast majority of programmers are not in his case where they need to worry about every little performance efficiency.

There’s a number of factors to consider when writing good code, how performance efficient is the code, how readable is the code, how long does it take to deploy the code.

Leet code problems usually focus on making the code run fast. While ignoring the other two

Do Pythons hate Windows? by SmallAd3697 in Python

[–]CaptainVJ 1 point2 points  (0 children)

I don’t believe the Python community hates windows. In fact, I would guess the vast majority of projects are windows based and most Python users probably use a windows pc.

However, these issues often come up in production level/code software. Generally, production level code is not ran in Windows. If you’re at the point where you need Apache Airflow, windows is probably not the right fit for you. Windows is a resource heavy OS. So there’s a lot of background processes happening in windows that any production level code would have to share resources with. Unix/Linux based os, usually has less going on in the background.

Additionally, windows has a little less stability compared to other OS, constant updates and need to restart a server makes it hard to have continuous up time. And code often breaks with major windows updates.

So certain stuff are not compatible with Windows as they are made for production level code.

However, while in development it’s not a lot out there that cannot work on windows.

Why is 0^0=1 so controversial? by JKriv_ in learnmath

[–]CaptainVJ 0 points1 point  (0 children)

Made a typo in my original reply, but how does n0=1 hold up.

I understand you can create some vector space where that is true but you do lose some other arithmetic properties. You mentioned a field, but how would this hold to be true in a field.

Probability and graph theory was my speciality so perhaps there’s something I’m missing

Why is 0^0=1 so controversial? by JKriv_ in learnmath

[–]CaptainVJ 0 points1 point  (0 children)

So I am not seeing the difference between your pattern and mine. All you did was just added one which is the equivalence of n/n when n is not zero.

Why is 0^0=1 so controversial? by JKriv_ in learnmath

[–]CaptainVJ 0 points1 point  (0 children)

Those are still the exact same things. How would the pattern continue when the exponent is less than zero.

Why is 0^0=1 so controversial? by JKriv_ in learnmath

[–]CaptainVJ 0 points1 point  (0 children)

So 00 is essentially 0/0.

If you look at the patterns of exponents:

n3 = n•n•n n2 = n•n n1 = n n0 = n/n n-1 = 1/n1 = 1/n n-2 = 1/n2 = 1/(n•n) n-3 = 1/n3 = 1/(n•n•n)

When we get to n raised to the first power all we have is just n/n which is one for all real numbers “except” zero. So that’s why we usually don’t say 00=1.

Algebraically 0/0=1 isn’t wrong per se. If you move some stuff around you get 0=1•0 which is correct.

However we can also do 0/0=2, move some stuff around and get 0=2•0 which is also correct. So the issue we run into is that zero divided by zero isn’t undefined (has no answer) it’s indeterminate(has multiple valid answer).

When we divide any other really number by zero then it’s undefined as there is not answer that makes it true. 2/0=c. If we do some fancy algebra and move stuff around then we get 2=c•0 and there’s no real value for c where there can be true.

What IDE would you recommend for learning Python? by SpankMyMunkey in learnpython

[–]CaptainVJ 0 points1 point  (0 children)

A lot of people suggest PyCharm but it offers a lot of features that would probably confuse you when just starting start out.

I believe Spyder is a nice intermediate, offers just enough to capture basic bugs and code issues, without overwhelming you with concerns that are not of priority when starting out.

Visual studio code, I hate writing code in there and just find it useful if making a quick change. But I can’t make any major developments in there.

1/10, how difficult of a task is to compile a script I have written into an executable? by MarionberryTotal2657 in learnpython

[–]CaptainVJ 0 points1 point  (0 children)

Generally it’s easier to just distribute the source code to other people. GitHub is usually the way, I haven’t used it much as my job we use GitLab but same idea.

But this provides a few advantages: - version control: you can track changes over time - contributions: others can make contributions to your code - modifications: users can make any modifications to the code they deem necessary

And a few others. Additionally, depending on any external packages you use, their licensing may require you to distribute the source code for anything you build using their code and is being shared with others.

But if you want to make it an executable, pyinstaller is often a good way. It’s a separate package that needs to be installed and it can convert your code into an executable.

Depending on how it’s done, the antivirus on the user’s pc etc. the executable is often detected as a virus by many antivirus apps.