This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import re | |
import portage | |
import shlex | |
optfeature_re = re.compile(r'optfeature\s+(.*)$') | |
packages = portage.db[portage.root]['vartree'].dbapi.cpv_all() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package fun.nightuser; | |
import java.time.Clock; | |
import java.time.Duration; | |
import java.time.Instant; | |
import java.time.ZoneId; | |
import java.time.ZoneOffset; | |
public class AdjustableClock extends Clock { | |
private Clock fixedClock; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BIN = main | |
CXXFLAGS = -Wall -Wextra -std=c++20 | |
CPPFLAGS = -MMD | |
SRCS = $(wildcard *.cc) | |
OBJS = $(SRCS:.cc=.o) | |
DEPS = $(SRCS:.cc=.d) | |
LINK.o = $(CXX) $(LDFLAGS) $(TARGET_ARCH) | |
.PHONY: all |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from typing import Optional | |
def dist(xs: list[str], i: int, k: int) -> int: | |
return sum(c1 != c2 for c1, c2 in zip(xs[i + k], xs[i - k - 1], strict=True)) | |
def weak_palindromes(xs: list[str]) -> list[tuple[int, Optional[int]]]: | |
left = 0 |
OlderNewer