Spyke

Posts

programminghorror·Programming Horrorbymoosetwin

in python, made by me, not as a joke

"maybe I shouldn't have learned programming from youtube tutorials..."

it's supposed to turn a list (e.g. [1, 2, 3, 4, 1, 0] ) into [1, 2, 3, 4, 10]

it actually works (for my use-case, anyways) but is completely ridiculous and I'm about to remove it in favor of bypassing this problem entirely

text code if you want:

newplant = [1, 2, 3, 4, 1, 0] # can be a list of any positive int with a 0 before another number
for number in newplant:
            if number == 0:
                newplant[(newplant.index(0) - 1):(newplant.index(0) + 1)] = [int(''.join(str(v) for v in [newplant[(newplant.index(0) - 1)], 0]))]
View original on lemmy.dbzer0.com
coolwebsites·cool websitesbymoosetwin

Shademap

cross-posted from: https://lemmy.ca/post/45600167

YSK that if you are planning an outdoor event, you can check where the shade and shadows will fall on a given day and time

A friend is planning an event this summer and wanted to find a shady spot in a large park for people to sit. I remembered seeing this project, and it helped in my use case

Here is the website: https://shademap.app/

Here is the developer's GitHub with some code, API, and sample projects: https://github.com/ted-piotrowski

Here is an article I found by Bellingcat talking about the features: https://bellingcat.gitbook.io/toolkit/more/all-tools/shademap

There is also this other tool ShadowMap (app.shadowmap.org), but the data quality wasn't great for the places that I tried.

Shademaphttps://shademap.app/Open linkView original on lemmy.dbzer0.com