Skip to content

Instantly share code, notes, and snippets.

View Kylmakalle's full-sized avatar

Sergey Akentev Kylmakalle

View GitHub Profile
@Kylmakalle
Kylmakalle / console.log
Created June 4, 2024 11:06
tdlib fab354a linking error
ld: Undefined symbols:
td::verbosity_mtproto, referenced from:
l_constinit in TDLibFramework[arm64][134](Logging.cpp.o)
td::verbosity_raw_mtproto, referenced from:
l_constinit in TDLibFramework[arm64][134](Logging.cpp.o)
td::mtproto::DhHandshake::run_checks(bool, td::mtproto::DhCallback*), referenced from:
td::CallActor::do_update_call(td::telegram_api::phoneCallAccepted const&) in TDLibFramework[arm64][39](CallActor.cpp.o)
td::CallActor::do_update_call(td::telegram_api::phoneCall const&) in TDLibFramework[arm64][39](CallActor.cpp.o)
td::SecretChatActor::run_auth() in TDLibFramework[arm64][223](SecretChatActor.cpp.o)
td::SecretChatActor::on_update_chat(td::telegram_api::encryptedChat&) in TDLibFramework[arm64][223](SecretChatActor.cpp.o)
@Kylmakalle
Kylmakalle / Telegram-iOS-SwitchInlineQuery.patch
Created January 19, 2024 09:51
Fix SwitchInlineQuery for Telegram mini apps opened with InlineKeyboardButton https://bugs.telegram.org/c/36392 , Fix available in https://t.me/swiftgram
diff --git forkSrcPrefix/submodules/TelegramUI/Sources/ChatController.swift forkDstPrefix/submodules/TelegramUI/Sources/ChatController.swift
index 73da2bf8b4cca4dbd5c7d36555019fa1afa1b777..188f83c41e67039b791b77de26469c4a27f2a911 100644
--- forkSrcPrefix/submodules/TelegramUI/Sources/ChatController.swift
+++ forkDstPrefix/submodules/TelegramUI/Sources/ChatController.swift
@@ -3962,6 +3962,22 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
let params = WebAppParameters(source: .generic, peerId: peerId, botId: peerId, botName: botName, url: result.url, queryId: result.queryId, payload: nil, buttonText: buttonText, keepAliveSignal: result.keepAliveSignal, forceHasSettings: false)
let controller = standaloneWebAppController(context: strongSelf.context, updatedPresentationData: strongSelf.updatedPresentationData, params: params, threadId: strongSelf.chatLocation.threadId, openUrl: { [weak self] url, concealed, commit in
This file has been truncated, but you can view the full file.
Media Info {creatingLibrary: {…}, media: {…}}
index-52687a8a.js:930 {width: 1080, height: 1920, video_codec: 'avc1', audio_codec: '2 / 40 / mp4a-40-2', framerate: 60, …}audio_bitrate: 163728audio_codec: "2 / 40 / mp4a-40-2"duration: 42framerate: 60height: 1920video_bitrate: 1700475video_codec: "avc1"width: 1080[[Prototype]]: Object
index-52687a8a.js:930 (7) ['-loglevel', 'debug', '-v', 'trace', '-i', 'input.mp4', 'output.mp4']
index-52687a8a.js:930 Wake Lock acquired
index-52687a8a.js:930 FFMPEG [stderr] ffmpeg version 5.1.3 Copyright (c) 2000-2022 the FFmpeg developers
index-52687a8a.js:930 FFMPEG [stderr] built with emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.40 (5c27e79dd0a9c4e27ef2326841698cdd4f6b5784)
index-52687a8a.js:930 FFMPEG [stderr] configuration: --target-os=none --arch=x86_32 --enable-cross-compile --disable-asm --disable-stripping --disable-programs --disable-doc --disable-debug --disable-runtime-cpudetect --disable-autodetect --nm=emnm --ar=emar --ranlib=emran
@Kylmakalle
Kylmakalle / gist:3377b7581cc73b8d0e28e3e2d642372c
Last active August 26, 2023 18:46 — forked from kongtomorrow/gist:9a8530528cac708a7b48
Swift options for use with -Xllvm
swiftc -Xllvm --version /tmp/foo.swift
LLVM (http://llvm.org/):
LLVM version 14.0.3
Optimized build.
Default target: arm64-apple-darwin22.6.0
Host CPU: apple-m1
swiftc -Xllvm -help-hidden /tmp/foo.swift
USAGE: swift (LLVM option parsing) [options]
@Kylmakalle
Kylmakalle / asyncio_download.py
Last active March 23, 2023 11:26
Comparing aiohttp vs requests parallel file download methods
import asyncio
import aiohttp
import timeit
import os
import shutil
urls = [
"https://speedtest.london.linode.com/garbage.php?ckSize=20",
"https://httpbin.org/get",
"https://httpbin.org/uuid",
from fastapi import FastAPI
app = FastAPI()
from typing import Optional
from uvicorn import run
from pydantic import BaseModel, Field
@Kylmakalle
Kylmakalle / main.py
Last active January 16, 2020 16:56
Получить IP адреса по Домену / Get ip address by domain
import socket
from threading import Thread, Lock
# Блокировщик для правильного вывода print, потокобезопасно
s_print_lock = Lock()
def s_print(*a, **b):
"""Потокобезопасная функция print"""
with s_print_lock:
@Kylmakalle
Kylmakalle / rpi_status_bot.py
Created November 24, 2019 20:40
Raspberry Pi Telegram status bot based on pyTelegramBotAPI lib.
import subprocess
import telebot
from credentials import token
# credentials.py
# --------------
# token = "435038115:AAGcT63s9aOHcXT3h6SQH36lceVvh..."
#
@Kylmakalle
Kylmakalle / NN.md
Created April 17, 2019 19:59 — forked from sonnyksimon/NN.md

Neural Networks

FROM python:3.6-alpine3.7
RUN apk update && \
apk add --no-cache ca-certificates mongodb-tools alpine-sdk openssl && \
pip3 install b2 sh requests --no-cache-dir -q --compile && \
rm -rf /var/cache/apk/*