This file contains 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
brew install openssl@3 readline tcl-tk | |
export PYENV_CCACHE_DISABLE=1 | |
export PYTHON_CFLAGS='-mcpu=native' | |
export PYTHON_CONFIGURE_OPTS='--enable-optimizations' | |
MAKE_OPTS='-j4' pyenv install -f 3.8 | |
export PYTHON_CONFIGURE_OPTS='--enable-optimizations --with-lto' | |
MAKE_OPTS='-j4' pyenv install -f 3.9 3.10 3.11 3.12 |
This file contains 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
""" | |
Export a Conda environment with --from-history, but also append | |
Pip-installed dependencies | |
Exports only manually-installed dependencies, excluding build versions, but | |
including Pip-installed dependencies. | |
Lots of issues requesting this functionality in the Conda issue tracker, | |
e.g. https://github.com/conda/conda/issues/9628 |
This file contains 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
module Interval | |
import Data.So | |
-- [TODO] Can we use a "parameters" block to avoid writing `Ord t =>` everywhere? | |
public export | |
rangeValid : Ord t => (closed : Bool) -> (lower: t) -> (upper: t) -> Bool | |
rangeValid closed lower upper = (ifThenElse closed (<=) (<)) lower upper |
This file contains 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 bash | |
# Copyright (c) 2015, 2020, and 2021 by Greg Werbin. | |
# | |
# Permission to use, copy, modify, and/or distribute this software for any purpose with | |
# or without fee is hereby granted, provided that the above copyright notice and this | |
# permission notice appear in all copies. | |
# | |
# THE SOFTWARE IS PROVIDED “AS IS” AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS | |
# SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT |
This file contains 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
## Lists | |
result_list_1 = [] | |
for x in xs: | |
for y in ys: | |
for z in zs: | |
if condition(x, y, z): | |
result_list_1.append((x, y, z)) | |
result_list_2 = [ |
This file contains 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
dotenv list --format=shell |
This file contains 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
[tool.flakeheaven] | |
max-line-length = 88 | |
format = 'grouped' | |
# Options for flake8-rst-docstrings | |
# https://github.com/peterjc/flake8-rst-docstrings#configuration | |
rst-roles = [ | |
# Built-in roles |
This file contains 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
; https://stackoverflow.com/a/40028542/2954547 | |
(defun collect-alist-loop (items) | |
(unless (evenp (length items)) | |
(error "Items must have an even number of pairs!")) | |
(loop | |
:for (a b) | |
:on items | |
:by #'cddr | |
:collect (cons a b))) |
This file contains 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 python | |
r"""Extract dependencies from Pyproject PEP 621 "project" section. | |
Specificiation: https://peps.python.org/pep-0621/ | |
""" | |
import sys | |
from argparse import ArgumentParser | |
from enum import IntEnum |
This file contains 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
from collections import UserString | |
from collections.abc import Callable, Mapping | |
from typing import Any, MutableSequence, ParamSpec, Protocol, TypeVar, overload | |
from typing_extensions import Self, Unpack | |
class _HasName(Protocol): | |
__name__: str | |
NewerOlder