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 --platform=linux/amd64 ubuntu:24.10 AS bioinf | |
# --platform specification here is crucial because as of now, | |
# without specifying it Docker starts building for ARM | |
# by default, which leads to "rosetta: failed to open elf" errors. | |
RUN apt-get update && apt-get install -y less vim wget | |
# Install other utilities of your liking. Specifically, if git is needed: | |
# RUN apt-get install git && mkdir -p /root/.ssh && ssh-keyscan github.com >> /root/.ssh/known_hosts | |
# ssh-keyscan is invoked for git clone to work. Note that only GitHub will work now, change to required host. |
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
""" | |
Regular expressions for matching emoji sequences. | |
For parsing single emoji, use either | |
re.match(EMOJI_SEQUENCE, string) | |
# or | |
EMOJI_REGEXP.match(string) | |
To match multiple emojis or custom patterns, insert `EMOJI_SEQUENCE` into pattern: |
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 dataclasses import dataclass | |
import sys | |
from typing import List, TextIO | |
@dataclass | |
class TreeNode: | |
name: str | |
children: List["TreeNode"] |
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
# -*- coding: utf-8 -*- | |
morse_alphabet = { | |
"А" : ".-", | |
"Б" : "-...", | |
"В" : ".--", | |
"Г" : "--.", | |
"Д" : "-..", | |
"Е" : ".", | |
"Ж" : "...-", |
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
import asyncio | |
import socketio | |
class AsynchronousSocketServer(socketio.AsyncServer): | |
def __init__(self, *args, **kwargs): | |
kwargs["async_handlers"] = True | |
super().__init__(*args, **kwargs) |