The problem with random or unaligned assignments is you end up with a randomly skilled programmer. Often not bad, but not on point.
The problem with Rosalind or Project Euler assignments is you end up with an excellent theoretical math or bioinformatics programmer. Often not bad, but not on point.
Fundamentally anyone with a degree or experience or a non-trivial github can write code, but you want to test their judgement, their thought process, their comprehension, their style, their knowledge about your business domain. Other than total open field blank slate projects (very little of my time over the last 35 yrs has been spent in that mode) you usually have existing systems and code. So give them a "special" sample of your own code. Shouldn't be too hard to find unless you're literally hiring the first technical employee. Then give it to them a couple days before an interview and inform then you're gonna review that code together, they'll present you with a rewritten, redesigned version, and then review the rewrite together.
If you'll feel bad about making them do "real" work, the best code to send out is some that has been heavily customized to only work some of the time, not properly error check, and intentionally somewhat obfuscated, so I sincerely hope that code thats screwed up to that level has to be intentionally manually generated for the interview. So strip out most of the failure/error detection code, screw up some of the code, maybe intentionally cut and paste an almost identical function in place to see if they clean that up. Some folks like intentional outright errors, like typos, is this the kind of programmer who can't write English? Also wipe most of the comments, put some intentional logic errors in the comments. This can be fun...
If you're looking for non-intro level programmers "everyone knows everyone" and my latest job we didn't talk programming because I was vouched for as knowing what I'm doing from years of coworker experience at a past employer. I'd be moderately offended if someone I worked with for five years asked me to fizzbuzz, either in person or as a take home test.