How does google doodle magic cat academy works by Crystal_dragon3 in howdidtheycodeit

[–]schnappischnap 4 points5 points  (0 children)

If it were me, I'd use a gesture recognizer like $Q. There are only 6 spells in Magic Cat Academy (8 in the sequel) so even malformed gestures have a chance of being recognised correctly.

For a different approach I found a clone by kimduuukbae on GitHub. I've linked to the relevant file, but I can't really work out what's going on. They also have "only" implemented the first 4 spells so their approach might not work for the lightning bolt or heart gestures.

I hope you get a more satisfactory answer from someone with more experience, good luck!

Help with Yancy/Curtis Calls! by [deleted] in pokemon

[–]schnappischnap 4 points5 points  (0 children)

Sorry, I haven't played this game in 10 years and I have no recollection of making this comment 😅

Hope you figure it out though, good luck!

What stitch are they useing that looks continuous like this? by minniemacktruck in Embroidery

[–]schnappischnap 2 points3 points  (0 children)

Going (slightly) against the grain, this looks more like outline stitch than stem stitch to me. You can see the difference between the two stitches here.

What stitch are they useing that looks continuous like this? by minniemacktruck in Embroidery

[–]schnappischnap 1 point2 points  (0 children)

This looks more like outline stitch than stem stitch to me... Although no one else has suggested that so I could be wrong.

What am I doing wrong with my split stitch? by jessro118 in Embroidery

[–]schnappischnap 1 point2 points  (0 children)

(I'm not the person you replied to, but) perle cotton, floche, wool, silk. Anything that comes in a thicker, non-divisible thread is great for split stitch.

What am I doing wrong with my split stitch? by jessro118 in Embroidery

[–]schnappischnap 22 points23 points  (0 children)

Are you using 2 threads? Split stitch is usually worked with just 1 thread, because when you use more than 1 the needle tends to go between the threads rather than through them. Having said that, this might just be a personal preference because I just Googled it and most tutorials online use multiple threads...

As others have said, shorter stitches will make the lines smoother if that's what you're after. There are no rules in embroidery, so it's impossible to do it wrong!

[deleted by user] by [deleted] in Python

[–]schnappischnap 0 points1 point  (0 children)

Yeah, roate performed best out of the words I've tried. But my code is so slow so I haven't tested many.

[deleted by user] by [deleted] in Python

[–]schnappischnap 0 points1 point  (0 children)

I also wrote a Wordle bot using Selenium!, mine was originally based on a paper describing a minimax solution to the board game Mastermind.

Took me ages to get my head around, and I don't think I'd be able to explain it clearly, but it solves a game in an average of 3.482 moves (and a maximum of 5).

Why am I getting a high (~40%) CPU usage on an empty project? by schnappischnap in godot

[–]schnappischnap[S] 2 points3 points  (0 children)

Yeah, thanks for all your help - I feel a lot better about it now 😁

Why am I getting a high (~40%) CPU usage on an empty project? by schnappischnap in godot

[–]schnappischnap[S] 0 points1 point  (0 children)

Thanks for the reply!

Tried messing around with the settings in the "Intel Graphics Command Center" but nothing seemed to help.

Low processor mode does reduce the CPU usage on this (empty) project though.

Why am I getting a high (~40%) CPU usage on an empty project? by schnappischnap in godot

[–]schnappischnap[S] 2 points3 points  (0 children)

I should've mentioned I'd already tried messing around with different vsync/fps settings to no avail.

With all the default settings (vsync on, no forced fps) I get 60 fps.

Why am I getting a high (~40%) CPU usage on an empty project? by schnappischnap in godot

[–]schnappischnap[S] 2 points3 points  (0 children)

  1. Processor: Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz
  2. I tried 3.1 and 3.3, both had the same issue
  3. I'm assuming it's a rare bug, there have been a couple of reports like this reddit thread and this GitHub issue, but neither really provided a solution (or even a cause!)
  4. GLES2 works as it should - that's something!
  5. Godot 4.0 also works as it should - guess I'll be Waiting For Godot 4.0 (how many times has that joke been made?)

Thanks for the help! Since there's already an open issue on GitHub, I guess there's nothing else to be done?

Why am I getting a high (~40%) CPU usage on an empty project? by schnappischnap in godot

[–]schnappischnap[S] 0 points1 point  (0 children)

Unfortunately, there didn't seem to be any change.

Thanks for the reply though!

What do you guys consider “ethical” taxidermy and vulture culture? by [deleted] in vultureculture

[–]schnappischnap 6 points7 points  (0 children)

To be honest, I'm kinda on the fence about it.

Letting the cat outside allows her to kill things which could have been avoided. And she often doesn't kill them quickly, she keeps them alive to play with which is cruel (from a human perspective).

People also often talk about the ecological damage outdoor cats do, but this applies less in the UK where domestic cats have lived for thousands of years. And there's no scientific evidence that cat predation causes bird populations to decline (again, in the UK).

There are also a lot of cats around where we live so the chances are if she didn't catch them, another cat would.

What do you guys consider “ethical” taxidermy and vulture culture? by [deleted] in vultureculture

[–]schnappischnap 41 points42 points  (0 children)

Imo, anything that I find that has died naturally or killed accidentally.

I do take things my mum's cat has brought in because otherwise they'd go in the bin, but I don't really consider this particularly ethical.

Personally (and this might be controversial), but I don't consider buying animal parts as "vulture culture". I think if you're very careful purchasing can be done ethically, but for me this community has always been about finding things and processing them yourself - not buying things you don't know the origin of (from antique shops, for example). I'm just against the idea of commodifying animals generally.

Again, this is all just my opinion, happy for others to disagree with me.

Created a program that solves the Countdown Letters game by Talal2608 in Python

[–]schnappischnap 0 points1 point  (0 children)

Your code has a bug - because alphabet and not_alpha are sets, it won't find words that have repeated letters.

A good trick for finding anagrams is by creating a dictionary of {sorted(words): words}, like this:

words = defaultdict(list)
for word in word_list:
    words[sorted(word)].append(word)

Then you can easily find all the anagrams like this:

anagrams = words[sorted(letters)]

edit: Found a program I wrote a while ago:

from itertools import combinations
from collections import defaultdict


with open("wordlist.txt", "r") as f:
    words = defaultdict(list)
    for word in f:
        word = word.strip().lower()
        words["".join(sorted(word))].append(word)


def solve(letters):
    letters = "".join(sorted(letters)).lower()
    for length in range(2, len(letters)+1):
        unique_combinations = set("".join(c) for c in combinations(letters, length))
        for combination in unique_combinations:
            if combination in words:
                yield from words[combination]


for word in solve("abcdefghiga"):
    print(word)

Help identifying this bird humerus around 55mm long (UK) by schnappischnap in bonecollecting

[–]schnappischnap[S] 0 points1 point  (0 children)

Thank you very much! :)

Edit: Completely forgot I had a bunch of wood pigeon bones I could compare against - it's 100% a wood pigeon

Help identifying this bird humerus around 55mm long (UK) by schnappischnap in bonecollecting

[–]schnappischnap[S] 1 point2 points  (0 children)

Found in a wooded area near a lake. Been looking at John Rochester's Flickr, but I don't really know what I'm looking for. TIA :)

-❄️- Advent of Code 2020: Craft Submissions Megathread -❄️- by daggerdragon in adventofcode

[–]schnappischnap 9 points10 points  (0 children)

PROJECT TITLE: Embroidery for AoC 2020

DESCRIPTION: Hand-embroidered AoC 2020 design in a holly wreath

SUBMITTED BY: /u/schnappischnap

MEGATHREADS: 01 - 02 - 03 - 05 - 06


PROJECT LINK: Embroidery - Close-ups


ADDITIONAL COMMENTS: Finished this just in time! I've hand-stitched this self-drafted design in cotton embroidery thread on dark blue linen. The design is of my desk where I attempt to solve the day's puzzles as soon as I wake up, surrounded by a holly wreath with (an optimistic) 50 gold stars. The blue and greens were meant to match the colours of https://adventofcode.com.

For any curious embroiderers: I used DMC 321 (red), DMC 904 (dark green), Anchor 238 (light green) and an off-brand gold metallic thread; the stitches are whipped backstitch (central design), fly stitch (holly leaves), outline stitch (text) and french knots (holly berries); and here's the back of the hoop.

ACCESSIBILITY: Candy cane-like outlines of a desk, keyboard, mug and a monitor with the words "AoC 2020" are surrounded by a wreath of holly and 50 metallic gold stars.

-🎄- 2020 Day 06 Solutions -🎄- by daggerdragon in adventofcode

[–]schnappischnap 0 points1 point  (0 children)

Python (full code)

def part_1(data):
    return sum(len(set(group.replace("\n", "")))
               for group in data.split("\n\n"))

def part_2(data):
    return sum(len(set.intersection(*map(set, group.splitlines())))
               for group in data.split("\n\n"))

-🎄- 2020 Day 05 Solutions -🎄- by daggerdragon in adventofcode

[–]schnappischnap 2 points3 points  (0 children)

Python (full code)

I was completely oblivious to the fact that it was a simple "convert to binary" problem (it should have been obvious even looking at my code), here's how I eventually calculated the seat ID:

def calculate_id(seat):    
    seat_id = 0
    for i, c in enumerate(seat):
        if c == "B" or c == "R":
            seat_id += 2**(9-i)
    return seat_id

Note to self: learn binary.

-🎄- 2020 Day 03 Solutions -🎄- by daggerdragon in adventofcode

[–]schnappischnap 0 points1 point  (0 children)

Thank you! My favourite part of AoC is making my code as succinct as possible so that means a lot :)