Skip to content

Instantly share code, notes, and snippets.

@sobolevn
sobolevn / rules.md
Created September 14, 2023 11:12
Правила MoscowPython Discord

Правила сообщества MoscowPython Discord

Адрес чата: https://discord.gg/tNxbPpDchQ

О чём можно

  • мероприятия и проекты сообщества
  • Python и сопутствующая экосистема
  • новости, которые хотя бы косвенно связаны с Python
  • мир разработки вокруг
import ast
import argparse
import os
import sys
import tokenize
from dataclasses import dataclass
from typing import Final, TypeAlias
_AnyFunction: TypeAlias = ast.FunctionDef | ast.AsyncFunctionDef
@sobolevn
sobolevn / setup.cfg
Created May 31, 2023 14:26
flake8 configuration example
[flake8]
# Base flake8 configuration:
# https://flake8.pycqa.org/en/latest/user/configuration.html
format = wemake
show-source = true
statistics = false
doctests = true
# darglint configuration:
# https://github.com/terrencepreilly/darglint

Intro

Working with open-source software is now a regular part of our lives. We can now say that open-source software has major market shares in almost all fields.

Verifying what is going on inside an application by yourself is especially important in DeFi, where transparency and openness are key philosophical factors. For example, any third-party security researcher can audit and verify the state of security of any open-source project. This creates a lot of trust among end users and other developers.

Everyone can help to improve the software they use if needed, which creates a connection between developers and forms a community around a piece of software.

#!/usr/bin/env python3.8
# @generated by pegen from python.gram
import ast
import sys
import tokenize
from typing import Any, Optional
from pegen.parser import memoize, memoize_left_rec, logger, Parser

Правила сообщества PythoNN

Адрес чата: t.me/pytho_nn

О чём можно

  • мероприятия и проекты сообщества
  • Python и сопутствующая экосистема
  • новости, которые хотя бы косвенно связаны с Python
  • мир разработки вокруг
» ./python.exe -m test -w -v test_typing
== CPython 3.11.0a4+ (heads/main-dirty:ef3ef6fa43, Jan 20 2022, 20:48:25) [Clang 11.0.0 (clang-1100.0.33.16)]
== macOS-10.14.6-x86_64-i386-64bit little-endian
== cwd: /Users/sobolev/Desktop/cpython/build/test_python_7182æ
== CPU count: 4
== encodings: locale=UTF-8, FS=utf-8
0:00:00 load avg: 1.84 Run tests sequentially
0:00:00 load avg: 1.84 [1/1] test_typing
test_all (test.test_typing.AllTests) ... ok
======================================================================
ERROR: test_basic (test.test_typing.NewTypeCTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/sobolev/Desktop/cpython/Lib/test/test_typing.py", line 4017, in setUp
raise ValueError
^^^^^^^^^^^^^^^^
ValueError
======================================================================
This file has been truncated, but you can view the full file.
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" /><link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous" /><title>Cosmic Ray Report</title></head><body><div class="container"><h1><p class="text-dark">Cosmic Ray Report</p></h1></div><div class="container"><div class="mb-1" id="summary_info___accordion"><div class="card"><a data-toggle="collapse" data-target="#summary_info___collapse_1" aria-expanded="true" aria-controls="summary_info___collapse_1" href="#"><div class="card-header" id="summary_info___heading_1"><button class="btn btn-outline-dark"><h4 class="m-0">Summary info</h4></button></div></a><div aria-labelledby="summary_info___heading_1" data-parent="#summary_info___accordion" class="collapse show" id="summary_info___collapse_1"><div class="card-body"><