1:
real 0m39.444s
user 0m39.348s
sys 0m0.058s
2:
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| # | |
| # Copyright (C) 2010 David Eppstein | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining a | |
| # copy of this software and associated documentation files (the "Software"), | |
| # to deal in the Software without restriction, including without limitation | |
| # the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
| # and/or sell copies of the Software, and to permit persons to whom the |
| from pathlib import Path | |
| from typing import cast | |
| import libcst as cst | |
| import libcst.matchers as m | |
| class ImportRewriter(cst.CSTTransformer): | |
| def __init__(self, module_names: set[str]): | |
| self.mod_match = m.Name(value=m.MatchIfTrue(module_names.__contains__)) |
| #!/usr/bin/env nix-shell | |
| #!nix-shell -i python3 -p python3Packages.requests python3Packages.beautifulsoup4 smenu | |
| import argparse | |
| from collections.abc import Sequence | |
| from dataclasses import dataclass | |
| from functools import partial | |
| from subprocess import PIPE, CalledProcessError, run | |
| from sys import exit | |
| from typing import cast |
| { | |
| description = "LiquidHaskell"; | |
| inputs = { | |
| nixpkgs.url = github:NixOS/nixpkgs/nixos-unstable; | |
| flake-utils.url = github:numtide/flake-utils; | |
| liquidhaskell-src = { | |
| url = github:ucsd-progsys/liquidhaskell; | |
| flake = false; |
| { | |
| description = "A very basic flake"; | |
| outputs = { self, nixpkgs }: { | |
| a = 1; | |
| }; | |
| } |
| ### Keybase proof | |
| I hereby claim: | |
| * I am mathiassven on github. | |
| * I am mathiassven (https://keybase.io/mathiassven) on keybase. | |
| * I have a public key ASA52foPePg3jpHXheVAaCtLAoChovcMJQCw4eQZvjooPwo | |
| To claim this, I am signing this object: |
This is an OpenPGP proof that connects my OpenPGP key to this Github account. For details check out https://docs.keyoxide.org/advanced/openpgp-proofs/
[Verifying my OpenPGP key: openpgp4fpr:88CDD3605FAF3B072F96E411569C12C53A202739]
| from __future__ import annotations | |
| from contextlib import suppress | |
| from typing import Any, ClassVar | |
| from typing_extensions import reveal_type | |
| class Foo: ... | |
| class SubFoo(Foo): | |
| def bar(self) -> int: return 5 |