Currently, several Python distributors modify the Python install layout. Making such modifications requires them to patch multiple standard library modules. The install layout is currently not meant to be a configurable option in a Python installation, but Python developers, distro packagers and module authors all have conflicting certain assumptions in this area. This has presented itself as problematic because Python distributors, understandably, fail to correctly modify all places required to satisfy all these assumptions, resulting in incoherent or straight-out broken Python distributions being shipped to millions
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
def expand(value): | |
args = [] | |
escape = False | |
end_section = None | |
section = '' | |
for c in value: | |
# previous character was \, just append this one | |
if escape: | |
section += c | |
escape = False |
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 typing | |
@typing.runtime_checkable | |
class SomeProtocol(typing.Protocol): | |
def foo(self): ... | |
class Hello: | |
def foo(self): |
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 collections.abc | |
match []: | |
case collections.abc.Iterable(): | |
print('iterable!') | |
case _: | |
print('default :/') |
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
diameter_small = 3.3; | |
diameter_big = 4.2; | |
distance = 15.5; | |
border = 2; | |
thickness = 0.8; | |
$fn = 80; | |
difference() { | |
hull() { |
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
$ tree | |
. | |
└── package | |
├── a | |
├── b | |
└── c | |
1 directory, 3 files | |
$ python | |
Python 3.10.8 (main, Nov 1 2022, 14:18:21) [GCC 12.2.0] on linux |
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/bash | |
pdftotext -layout "$@" - | sed -e '/^ [0-9][0-9][0-9][0-9][0-9][0-9]/!d' -e 's|,|\.|g'| awk -F '[[:space:]][[:space:]]+' '{print $6}' | R -e 'd <- density(scan(file("stdin"))); plot(d, main="Notas de SO"); polygon(d, col="red")' |
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 argparse | |
import textwrap | |
from PIL import Image, ImageSequence | |
def main() -> None: | |
parser = argparse.ArgumentParser( | |
description=textwrap.indent( | |
textwrap.dedent( |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.