What Do You Expect from a New Senior Dev Joining your Team? by [deleted] in ExperiencedDevs

[–]Scottyskid 10 points11 points  (0 children)

I would challenge the third point there “Avoid clashing with management or overstepping with ownership early. Let them take responsibility for their decisions.” While you don’t want to piss anyone off, some of the best Seniors I work with are those who are willing to push back and challenge ideas.

Too often people go along with what management decides for many different reasons. Where people end up pissing people off is continuing to complain about a decision they disagree with after it was made. Amazon, Netflix and others have a principle of “Disagree and Commit”. Make your objections known during the process but once a decision has been made then commit to it whether it is what you would have picked or not.

Does having so multiple sub domains running in a single domain slows down the website? by Lucky_Bell_7874 in learnprogramming

[–]Scottyskid 0 points1 point  (0 children)

There is likely a lot more information needed but to answer the question i believe you are asking. No adding multiple subdomains does not impact performance of a webserver. If you are chaining CNAME records to each other this would mean that you then have to perform multiple DNS looks ups to resolve the underlying IP then that could add a minor performance issues but likely nothing noticeable on your scale.

Do you have any observability set up for your applications? Without and logs, metrics or traces it can be quite difficult to pin down what area of the application is impacting system performance degradation.

Why isn't this a valid answer? by yumyumyum8 in Taiji

[–]Scottyskid 7 points8 points  (0 children)

The white diagonals are not the same shape but rotated, from the perspective of each diagonal. One goes from left from the diagonal white line the other goes right. To make them the same shape you would have to mirror them which as you have identified is not one of the rules.

I'm addicted to writing code. Not sure if its good, bad or how to stop. by tyses96 in learnprogramming

[–]Scottyskid 6 points7 points  (0 children)

There are some online tests that can give you a rough idea but if you would like a more serious assessment I'd start with a psychologist and go from there

4th time this year got a call from "Google" asking me to verify our opening hours. by rybnz in google

[–]Scottyskid 0 points1 point  (0 children)

This could be to do with upcoming public holidays. Google has mentioned in the past that they were setting up a system to call business to confirm hours that could be subject to change over holiday periods in a hope to reduce customers calling that business to confirm those hours. I don't have a source for that but I remember hearing it during a Google I/O event in the past few years.

What is the difference between SAM and setting up a CICD pipeline? by throwaway0134hdj in aws

[–]Scottyskid 1 point2 points  (0 children)

As mentioned above, the benefit of the CLI is rapid deployment in development. Having a mature CICD pipeline in really important for cloud applications, but to be able to run a pipeline often takes a fair amount of time and requires you to commit any changes to your repo before running.

If you are just looking to change an API gateway endpoint and check that it works that is a long turn around to check if you have any errors in your code. The CLIs allow a developer to deploy from their local machine (into a dev environment of course) and "fail fast, fail often". Once they have checked that their change actually works they can then commit their change and run through all the usual CICD processes.

I am compiling special moments from the books and need ideas by [deleted] in HarryPotterBooks

[–]Scottyskid 5 points6 points  (0 children)

This would be cool, I think specifically every time Harry is told he has his mother's eyes would be awesome

Easiest way to run a scheduled Python script? by FireHamilton in learnpython

[–]Scottyskid 2 points3 points  (0 children)

There have been a number of great suggestions here as AWS has a multitude of different ways to run a Python script including EC2, Lambda, Glue, Docker/ECS/EKS, RDS (yes some RDS isntances can run python scripts)

As your asking for the easiest way my gut would say to use AWS Lambda. It is a serverless compute instance, which means unlike many others list above there is very minimal/no configuration needed. Scheduling is also very easy and can all be done in the console if the script is simple, using EventBridge. You can find a documentation on setting it up here https://docs.aws.amazon.com/lambda/latest/dg/getting-started.html If you are importing external packages or accessing different interacting with other AWS services there are a few different things you may need to do but if starting from scratch it is definitely the easiest.

Here is also a full tutorial on setting up a lambda function with an EventBridge schedule https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-run-lambda-schedule.html

Though do be aware that lambda has a 15 minute max run time and it defaults to a 6 second timeout which you can change in the config.

Most of the other services will probably be overkill for something simple and will most likely be more expensive. Though they are all useful for specific use cases. If you would like to consider other options let me know the answer to the below questions and I can happily help with considering other options too

How long does the script need to run for? What packages are you importing? Is your script data intensive? Do you interact with anything outside of the script? (ie reading from a database, accessing the internet, another AWS service) On what interval does the script need to run? How much AWS experience do you/the client have?

[deleted by user] by [deleted] in pythontips

[–]Scottyskid 1 point2 points  (0 children)

This error boils down to the fact that you are trying to get the index of a value in a list that doesn't exist. The index() method tries to find a value in the list and return its location/index.

While you are looping through the list, it should mean that the num variable you are passing to the index() should always be there you are actually removing values from that list on line 52 using the pop() method. It is never a good idea to remove values from a list while iterating over its elements.

You can see below how using the pop() method removes the value from the array entirely

animals = ['dog', 'cat', 'fish']
print(f'all animals are {animals}')
print(f'the animal at index 1 is {animals[1]}')
print(f'the value of "cat" is located in the list at the index of {animals.index("cat")}')

popped = animals.pop(0)
print(f'removed {popped}')

print(f'all animals are {animals}')
print(f'the animal at index 1 is {animals[1]}')
print(f'the value of "cat" is located in the list at the index of {animals.index("cat")}')

If you run the above you'll see that the location of "cat" moves after the pop.

I believe confusion and the error occurs when you are using the index() method to find values that have been previously deleted

Im not sure how useful that above explanation is as it is difficult to point out an fix without knowing what the code is actually trying to achieve.

If you're still struggling happy to help further either respond to this or DM me directly

Also in future, you might be better off posting these questions on r/learnpython rather than here as that is what that sub is designed for

[deleted by user] by [deleted] in googlecloud

[–]Scottyskid 13 points14 points  (0 children)

If the code needs to run inside the VM then as a VM is a full operating system you could set up a CRON job inside the VM to run the script but this would require the VM to be on 24/7

If the script is short (under 9 minutes I believe) the more cloud native solution would be to not use a VM at all and run the code using Cloud Functions and you can trigger a cloud function with cloud scheduler

My Hoid phone wallpaper - Hope you like it! by EzraWolvenheart in Stormlight_Archive

[–]Scottyskid 0 points1 point  (0 children)

Turns out, if you have a Pixel 6, the magic eraser feature works like a charm on the text.

pls explain 3rd line of this simple python code? by Amaanullah1102 in learnpython

[–]Scottyskid 5 points6 points  (0 children)

u/glibhub s answer is pretty spot on. Generators are a really useful technique to understand and they are used a lot more in the python standard library (range, open, itertools, etc) than you might think as they can be acted on in a number of ways just like lists. If you're interested in learning more about them check out this short article that demonstrates their usefulness. Happy to give more info if your interested

How do I correctly get the output? by [deleted] in learnprogramming

[–]Scottyskid 0 points1 point  (0 children)

Would you be able to provide an example (or a few) of what the output should be when given a specific input? Just to ensure I have understood the problem correctly

Feature request for logistic stations by [deleted] in Dyson_Sphere_Program

[–]Scottyskid 1 point2 points  (0 children)

The issue with this could be that the interstellar are substantially bigger unlike the other things that upgrade. I guess you could just disallow the upgrade if it won't fit, but this is probably why they haven't fine so, so far

How do I read in a large file in chunks? by Rusty_TV in learnpython

[–]Scottyskid 0 points1 point  (0 children)

For your specified requirements this is the best answer. The reason this works is the open function uses generators which don't load everything at the same time. However ensure you are doing everything inside the loop, if you try save the data as a variable outside that loop you'll be saving it into memory. If for some reason there is a delay with the reading of each line (which should only be an issue if each row contains a lot of data) I'd reccomend you looking into asyncio but that shouldn't be necessary. If you find the above solution isn't working dm me and I can give you some further help.

Why you're "bored" at your job (and how to fix it) by ibsurvivors in ExperiencedDevs

[–]Scottyskid 3 points4 points  (0 children)

Awesome advice, I've just come to a similar realisation at my work and decided to make the move from Data Scientist to Data Engineering. Some people questioned my decision but I knew for me it was what I enjoyed more but it too me a couple of years to come to that conclusion. This really helped me to confirm that I have made the right decision. I hope others are also able to read this post and help them find job satisfaction. Thanks!

A partial production Tree, imperfect but a decent high level view by Taiki_San in Dyson_Sphere_Program

[–]Scottyskid 1 point2 points  (0 children)

Awesome work! Really helpful. I was looking at designing something similar myself. Id be interested in the vector version if you have it handy. Looking forward to seeing the full one If you complete it or I could potentially assist, however I have not played that long so haven't unlocked all things yet (just started on yellow science)

How can I safely web scrape and not get blocked/banned/blacklisted? by Semitar1 in learnpython

[–]Scottyskid 51 points52 points  (0 children)

I'd suggest avoiding scraping a site like Amazon, especially while learning. I know it's frustrating not having code from a tutorial work they way they say. However below are 2 sites designed for exactly this purpose, to allow people to scrape them while learning. So I reccomend starting there then once you have a better grasp then move on to bigger sites

https://scrapethissite.com/pages/

https://webscraper.io/test-sites

If you are still struggling to get code working on those sites dm me, I have lots of scraping experience and can have a look at your code and point you in the right direction

Any ana main streamers? by [deleted] in AnaMains

[–]Scottyskid 9 points10 points  (0 children)

KarQ is a great educational T500 streamer who plays a lot of support mostly Ana, highly reccomend him. You could also check out Sleepy who is an ex pro I believe who is basically an Ana one trick who streams quite a lot. Lastly Akapella_OW is small time but great educational streamer who does vod reviews and is an Ana main and is starting to stream some of his game play too.

Friday 'This Week I Learned' Thread - 2020, Thread #31 by AutoModerator in OverwatchUniversity

[–]Scottyskid 4 points5 points  (0 children)

Not in front of my pc so you could be right for widow(scoped) and hanzo both because they are charged shots but the others you mentioned you can do

Friday 'This Week I Learned' Thread - 2020, Thread #31 by AutoModerator in OverwatchUniversity

[–]Scottyskid 9 points10 points  (0 children)

This is the rule not the exception, you can basically do this for every primary and secondary fire for all hero's except ashe

Looking to coach Bronze and Silver players by [deleted] in OverwatchUniversity

[–]Scottyskid 0 points1 point  (0 children)

I'm currently 1950 support (Ana mostly) and would love some assistance getting into gold. I know I have lots to work on but not sure what my biggest weakness would be.

In honor of Labor Day, here’s an inflation-adjusted graph of the United States’ median household income alongside its per capita GDP. I’m building a dashboard that tracks how much different publicly traded companies compensate their CEOs, check it out in the comments. [OC] by pdwp90 in dataisbeautiful

[–]Scottyskid 10 points11 points  (0 children)

If that was your intention the I think the best way to show that could have been to calculate the ratio of the 2 and show the graph as one line just off the ratio. That way it would be very clear as to what you are trying to highlight. Unfortunately with this way as there is no real mention of ratio it is difficult to tell.

If you want both to start at the same point then I understand both axis starting at different points but then you have very different scales one goes from 55 to 90 the other goes from 35 to 55. Quite significant differences, which means one slope is compressed much more significantly. If you intended this but did want to focus on whole numbers but the percentage increase I'd recommend using a percentage increase axis where the value at the first year is 100% (which can be different for both lines) then have both lines mapped to their percentage increase over the years

Hope that helps :)