Spyke

Posts

canvas·Canvasbyalycat

[Tutorial] Generate Canvas of Pixels Placed by Certain Users or Instances

Download the log file for canvas (check the pinned post as well in case the link changes)

Grab this snippet of code from Github (if you don't understand this code please DO NOT run it. Never run random code you grabbed from the internet if you can't read it :P)

Make sure you have Python and Python Pillow installed.

Change these variables to suite your needs

users = None
instances = None

The default None is actually "show me everything", I'm just bad at naming things.

E.g. I want to see the top 10 combined pixel placers, I would

 users = "[email protected] \
         [email protected] \
         [email protected] \
         [email protected] \
         [email protected] \
         [email protected] \
         [email protected] \
         [email protected] \
         [email protected] \
         [email protected]"

and set the instances to None

This would output this image

You can also set it to show pixels after a certain timestamp (although I haven't tested that properly)

Source code if you don't want to go to gist ::: spoiler spoiler

    This is free and unencumbered software released into the public domain.

    Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.

    In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

    For more information, please refer to <http://unlicense.org/>

from PIL import Image, ImageDraw
from datetime import datetime

# Get yours here https://cdn.sc07.company/canvas/2023/pixels.log.txt
log_filename = 'pixels.log.txt'

# Show pixles after this unix timestamp
start_time = 0

# Show specific users (example top 10 pixel placers)
# users = "[email protected] \
#         [email protected] \
#         [email protected] \
#         [email protected] \
#         [email protected] \
#         [email protected] \
#         [email protected] \
#         [email protected] \
#         [email protected] \
#         [email protected]"
# None specified will show ALL
# CASE SENSITIVE!!!
users = None

# Instances. None specified will show ALL instances
# Example, only show blahaj and lemmy.zip
# instances = "lemmy.blahaj.zone lemmy.zip"
instances = None

# Color palette dictionary
color_palette = {
    0: "000000",
    1: "222222",
    2: "555555",
    3: "888888",
    4: "CDCDCD",
    5: "FFFFFF",
    6: "FFD5BC",
    7: "FFB783",
    8: "B66D3D",
    9: "77431F",
    10: "FC7510",
    11: "FCA80E",
    12: "FDE817",
    13: "FFF491",
    14: "BEFF40",
    15: "70DD13",
    16: "31A117",
    17: "0B5F35",
    18: "277E6C",
    19: "32B69F",
    20: "88FFF3",
    21: "24B5FE",
    22: "125CC7",
    23: "262960",
    24: "8B2FA8",
    25: "D24CE9",
    26: "FF59EF",
    27: "FFA9D9",
    28: "FF6474",
    29: "F02523",
    30: "B11206",
    31: "740C00"
}

# Function to convert hex color to RGB tuple
def hex_to_rgb(hex_color: str) -> tuple[int, int, int]:
    return tuple(int(hex_color[i:i+2], 16) for i in (0, 2, 4))


# Mapping pallet index to RGB color values
color_mapping = {index: hex_to_rgb(hex_color) for index, hex_color in color_palette.items()}

# Read log
def read_log_entries(filename: str) -> list[tuple]:
    log_entries = []
    with open(filename, 'r') as log_file:
        for line in log_file:
            parts = line.strip().split('\t')
            timestamp = parts[0]
            user = parts[1]
            x_coord = int(parts[2])
            y_coord = int(parts[3])
            color = int(parts[4])
            action = parts[5]
            log_entries.append((timestamp, user, x_coord, y_coord, color, action))
    return log_entries


def filter_pixels(actions: str, start_time: int, users = None, instances = None):
    log_entries = read_log_entries(log_filename)
    pixel_actions = {}
    for entry in log_entries:
        timestamp, user, x_coord, y_coord, color, action = entry
        if start_time == 0 or datetime.strptime(timestamp, '%Y-%m-%d %H:%M:%S,%f') > datetime.fromtimestamp(start_time):
            if not users or user in users:
                if not instances or user.split("@")[-1] in instances:
                    if action == actions:
                        pixel_actions[(x_coord, y_coord)] = (user, color_mapping[color], timestamp)
    return pixel_actions


def draw_pixels(pixels, output: str) -> None:
    image_size = (1000, 1000)
    image = Image.new("RGB", image_size, "white")
    draw = ImageDraw.Draw(image)

    for pixel, (user, color, _) in pixels.items():
        x, y = pixel
        draw.point((x, y), fill=color)

    image.save(output)


draw_pixels(filter_pixels("user place", start_time, users, instances), "output_image.png")


:::

View original on lemmy.blahaj.zone
canvas·Canvasbyalycat

Pixels Placed per Instance

Total number of pixels placed by each instance. This includes ones that have been overwritten.

Edit: Added undo section

UndoPlacedDomain
5673264489lemmy.world
89056092feddit.de
70435315lemmy.blahaj.zone
51028312lemm.ee
36923844sh.itjust.works
31222568lemmy.ml
22415470lemmy.ca
22313954toast.ooo
16512916programming.dev
19412106lemmy.zip
21810057beehaw.org
929109lemmy.nz
1298186discuss.tchncs.de
1317039aussie.zone
205980pawb.social
825896mander.xyz
215571jlai.lu
624973feddit.nl
104492nano.garden
844450lemmy.dbzer0.com
1194413sopuli.xyz
973703startrek.website
493246lemmy.fmhy.net
333214feddit.ch
683101ani.social
263100feddit.nu
182906monero.town
302692lemy.lol
182577lemmy.sdf.org
802526feddit.it
272446infosec.pub
52294lemmy.henknet.org
62213lemmynsfw.com
171941reddthat.com
41820kerala.party
241731lib.lgbt
121726no.lastname.nz
201726lemmy.mariusdavid.fr
121571slrpnk.net
381347feddit.dk
21332bookwormstory.social
91269discuss.online
21239lemmy.sidh.bzh
361232fl0w.cc
91211lemmy.eco.br
381170geddit.social
31122szmer.info
111118social.dn42.us
301104lemmy.one
2985postit.quantentoast.de
38982lemdro.id
1924burggit.moe
22921midwest.social
3851lemmy.pt
1838mtgzone.com
6704lemmy.federated.club
0663casavaga.com
1603pornlemmy.com
0570lemmyrs.org
20568yiffit.net
0513lemmy.shtuf.eu
0467lemmings.world
10455lemmy.antemeridiem.xyz
5444red.cyberhase.de
9434lemmy.atay.dev
1350lemmy.ananace.dev
24325monyet.cc
12269lemmy.johnnei.org
0254wired.bluemarch.art
1233lemmy.myserv.one
0221l.antiope.link
15219lemmy.fan
2213lemmy.today
1208pricefield.org
1208lemmy.douwes.co.uk
0194fost.hu
2181dubvee.org
1158lemmy.jigoku.us.to
0146lm.bittervets.org
2136waveform.social
0134lemmy.name
1129discuss.as200950.com
2128lemmy.shinomoroll.net
0121lemmus.org
1119nebu.land
0112lemmygrad.ml
1107thegarden.land
0102lemmy.tf
0101lemmy.sedimentarymountains.com
099endlesstalk.org
095czech-lemmy.eu
392lemmy.dcmrobertson.com
089lemmy.cat
186lemmy.horwood.cloud
084ttrpg.network
070lemmy.comfysnug.space
69lemmy.dormedas.com
56etaorion.org
55compuverse.uk
49lemmy.sdfeu.org
44jemmy.jeena.net
39outpost.zeuslink.net
38rabbitea.rs
37lemmy.place
37lemmy.lukeog.com
29lemmy.studio
24orbiting.observer
23lzrprt.sbs
13thelemmy.club
12lmmy.net
12feddit.jcm.re
9lemmy.federa.net
9lemmy.dynatron.me
7lemmy.stuart.fun
6lemmy.felixperron.com
6lemm.live
3l.henlo.fi
3lemmy.tiebe.dev
3i.d0ntknow.me
2sha1.nl
2l.rickebo.com
2lm.paradisus.day
2lemmy.secnd.me
2lemmy.potatoe.ca
2leminal.space
1prxs.site
1lmmy.dk
1lemmy.timwaterhouse.com
1lemmy.run
1lemmy.loomy.li
1lemmy.kde.social
1lemmy.hoyle.me.uk

All actions:

::: spoiler spoiler

ActionsInstance
270946lemmy.world
57002feddit.de
36019lemmy.blahaj.zone
28898lemm.ee
24286sh.itjust.works
22880lemmy.ml
15694lemmy.ca
14630toast.ooo
13081programming.dev
12300lemmy.zip
10275beehaw.org
9201lemmy.nz
8324discuss.tchncs.de
7170aussie.zone
6000pawb.social
5978mander.xyz
5592jlai.lu
5035feddit.nl
4534lemmy.dbzer0.com
4532sopuli.xyz
4502nano.garden
3800startrek.website
3371lemmy.fmhy.net
3247feddit.ch
3169ani.social
3126feddit.nu
2924monero.town
2722lemy.lol
2606feddit.it
2595lemmy.sdf.org
2473infosec.pub
2299lemmy.henknet.org
2250lemmynsfw.com
2038reddthat.com
1824kerala.party
1755lib.lgbt
1746lemmy.mariusdavid.fr
1738no.lastname.nz
1583slrpnk.net
1383feddit.dk
1355discuss.online
1334bookwormstory.social
1241lemmy.sidh.bzh
1238fl0w.cc
1220lemmy.eco.br
1208geddit.social
1134lemmy.one
1129social.dn42.us
1125szmer.info
1093lemdro.id
987postit.quantentoast.de
943midwest.social
925burggit.moe
854lemmy.pt
839mtgzone.com
710lemmy.federated.club
663casavaga.com
604pornlemmy.com
588yiffit.net
570lemmyrs.org
513lemmy.shtuf.eu
470lemmings.world
457lemmy.antemeridiem.xyz
449red.cyberhase.de
443lemmy.atay.dev
351lemmy.ananace.dev
349monyet.cc
281lemmy.johnnei.org
254wired.bluemarch.art
234lemmy.myserv.one
234lemmy.fan
221l.antiope.link
215lemmy.today
209pricefield.org
209lemmy.douwes.co.uk
194fost.hu
183dubvee.org
159lemmy.jigoku.us.to
146lm.bittervets.org
138waveform.social
134lemmy.name
130discuss.as200950.com
128lemmy.shinomoroll.net
121lemmus.org
120nebu.land
112lemmygrad.ml
108thegarden.land
102lemmy.tf
101lemmy.sedimentarymountains.com
99endlesstalk.org
95lemmy.dcmrobertson.com
95czech-lemmy.eu
89lemmy.cat
87lemmy.horwood.cloud
84ttrpg.network
70lemmy.comfysnug.space
69lemmy.dormedas.com
57etaorion.org
55compuverse.uk
49lemmy.sdfeu.org
44jemmy.jeena.net
42rabbitea.rs
39outpost.zeuslink.net
38lemmy.lukeog.com
37lemmy.place
29lemmy.studio
24orbiting.observer
23lzrprt.sbs
18lemmy.federa.net
13thelemmy.club
13feddit.jcm.re
12lmmy.net
9lemmy.dynatron.me
9lemm.live
7lemmy.stuart.fun
6lemmy.felixperron.com
3l.henlo.fi
3lemmy.tiebe.dev
3i.d0ntknow.me
2sha1.nl
2l.rickebo.com
2lm.paradisus.day
2lemmy.secnd.me
2lemmy.potatoe.ca
2leminal.space
1prxs.site
1lmmy.dk
1lemmy.timwaterhouse.com
1lemmy.run
1lemmy.loomy.li
1lemmy.kde.social
1lemmy.hoyle.me.uk
:::
View original on lemmy.blahaj.zone
canvas·Canvasbyalycat
canvas·Canvasbyalycat

Top 100 Pixel Placers!

(I hope these automatically tag as I am not manually doing it lol)

Edit: This includes undoing pixels as well! I am working on removing them from this tally. Now using @[email protected]'s more accurate leaderboard https://toast.ooo/post/289361

4146 [email protected]
3898 [email protected]
3604 [email protected]
3569 [email protected]
2940 [email protected]
2878 [email protected]
2871 [email protected]
2800 [email protected]
2783 [email protected]
2727 [email protected]
2634 [email protected]
2613 [email protected]
2501 [email protected]
2495 [email protected]
2446 [email protected]
2412 [email protected]
2402 [email protected]
2366 [email protected]
2345 [email protected]
2308 [email protected]
2300 [email protected]
2285 [email protected]
2226 [email protected]
2204 [email protected]
2204 [email protected]
2192 [email protected]
2107 [email protected]
2086 [email protected]
2063 [email protected]
2043 [email protected]
2025 [email protected]
2017 [email protected]
2001 [email protected]
1923 [email protected]
1904 [email protected]
1899 [email protected]
1884 [email protected]
1882 [email protected]
1877 [email protected]
1876 [email protected]
1865 [email protected]
1817 [email protected]
1815 [email protected]
1810 [email protected]
1799 [email protected]
1798 [email protected]
1788 [email protected]
1780 [email protected]
1720 [email protected]
1706 [email protected]
1701 [email protected]
1681 [email protected]
1671 [email protected]
1664 [email protected]
1629 [email protected]
1629 [email protected]
1619 [email protected]
1613 [email protected]
1609 [email protected]
1592 [email protected]
1581 [email protected]
1564 [email protected]
1556 [email protected]
1549 [email protected]
1541 [email protected]
1540 [email protected]
1540 [email protected]
1539 [email protected]
1535 [email protected]
1503 [email protected]
1501 [email protected]
1493 [email protected]
1486 [email protected]
1471 [email protected]
1463 [email protected]
1451 [email protected]
1438 [email protected]
1431 [email protected]
1431 [email protected]
1425 [email protected]
1423 [email protected]
1411 [email protected]
1408 [email protected]
1408 [email protected]
1402 [email protected]
1388 [email protected]
1388 [email protected]
1385 [email protected]
1385 [email protected]
1374 [email protected]
1373 [email protected]
1365 [email protected]
1361 [email protected]
1344 [email protected]
1336 [email protected]
1321 [email protected]
1320 [email protected]
1311 [email protected]
1309 [email protected]
1302 [email protected]

Original list, which includes undos!

::: spoiler spoiler

4242 [email protected]

4000 [email protected]

3745 [email protected]

3612 [email protected]

3396 [email protected]

3099 [email protected]

2911 [email protected]

2902 [email protected]

2828 [email protected]

2807 [email protected]

2727 [email protected]

2702 [email protected]

2571 [email protected]

2526 [email protected]

2514 [email protected]

2497 [email protected]

2470 [email protected]

2431 [email protected]

2418 [email protected]

2406 [email protected]

2397 [email protected]

2324 [email protected]

2318 [email protected]

2260 [email protected]

2255 [email protected]

2238 [email protected]

2208 [email protected]

2185 [email protected]

2100 [email protected]

2091 [email protected]

2065 [email protected]

2051 [email protected]

2043 [email protected]

2027 [email protected]

2008 [email protected]

2006 [email protected]

1982 [email protected]

1951 [email protected]

1950 [email protected]

1909 [email protected]

1894 [email protected]

1891 [email protected]

1886 [email protected]

1872 [email protected]

1867 [email protected]

1837 [email protected]

1830 [email protected]

1827 [email protected]

1821 [email protected]

1765 [email protected]

1756 [email protected]

1755 [email protected]

1746 [email protected]

1721 [email protected]

1706 [email protected]

1703 [email protected]

1677 [email protected]

1675 [email protected]

1673 [email protected]

1649 [email protected]

1625 [email protected]

1613 [email protected]

1592 [email protected]

1588 [email protected]

1587 [email protected]

1584 [email protected]

1577 [email protected]

1570 [email protected]

1553 [email protected]

1549 [email protected]

1548 [email protected]

1536 [email protected]

1535 [email protected]

1515 [email protected]

1514 [email protected]

1511 [email protected]

1504 [email protected]

1499 [email protected]

1493 [email protected]

1488 [email protected]

1475 [email protected]

1468 [email protected]

1467 [email protected]

1447 [email protected]

1447 [email protected]

1440 [email protected]

1438 [email protected]

1431 [email protected]

1427 [email protected]

1425 [email protected]

1414 [email protected]

1409 [email protected]

1408 [email protected]

1390 [email protected]

1390 [email protected]

1387 [email protected]

1375 [email protected]

1363 [email protected]

1361 [email protected]

1337 [email protected] :::

View original on lemmy.blahaj.zone
firefox·Firefoxbyalycat

Good knowledge sources for tinkering Firefox

I am looking for alternative knowledge sources to mozillazine that's a bit more up to date.

Specifically, I am after something that explains advanced about:config options and what each sqlite file and storage directories in my profile are actually used for. When I search online for things I get unhelpful support articles from mozilla and random reddit threads with conflicting information.

I've played around with a lot of things through a lot of trial and error (I can share some about:config values if anyone's interested in them), but I'd like to be directed somewhere I can go to and check to make sure I won't break my profile.

I already use ffprofile to set up my user.js, but I'm looking for something with more documentation without having to resort to reading the source code of firefox.

View original on lemmy.blahaj.zone
vegan·Veganbyalycat

Issues viewing from other instances. Err 404

My friend is having issues viewing/subscribing to this community from another instance. Is it set up that way on purpose or is the community too small to be indexed?

I tried viewing here from a couple of other of instances and I just get:

404: couldnt_find_community

Wondering if this is a known issue or localised to us two. I also couldn't find any other vegan communities, so am unsure where to go from here.

View original on lemmy.blahaj.zone

You reached the end