Skip to content

Instantly share code, notes, and snippets.

View x0x8x's full-sized avatar
🏠
Working from home

x0x8x x0x8x

🏠
Working from home
View GitHub Profile
#!/usr/bin/env perl
# Copyright (C) 2007,2008,2009,2010,2011,2012,2013,2014,2015,2016
# Ole Tange and Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
@x0x8x
x0x8x / python_debugging-bookmarks.html
Created December 3, 2019 22:14
StackTracing Python
https://medium.com/python-pandemonium/debugging-an-inactive-python-process-2b11f88730c7
https://wiki.python.org/moin/DebuggingWithGdb
https://pymotw.com/2/trace/
https://eklitzke.org/dumping-multi-threaded-python-stacks
https://stackoverflow.com/questions/132058/showing-the-stack-trace-from-a-running-python-application
https://stackoverflow.com/questions/1781935/get-stacktrace-from-stuck-python-process
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE BRAIN1(chat_id INTEGER);
INSERT INTO BRAIN1 VALUES(313742192);
INSERT INTO BRAIN1 VALUES(914883535);
INSERT INTO BRAIN1 VALUES(979874299);
INSERT INTO BRAIN1 VALUES(722173482);
INSERT INTO BRAIN1 VALUES(940761691);
INSERT INTO BRAIN1 VALUES(858815359);
COMMIT;
from telethon import events
import asyncio
from collections import deque
import random
import string
import command
import module
@x0x8x
x0x8x / tg-vm-DEBUG.py
Created June 12, 2019 13:16
What the fuck is going on lately, got bunch of WorkerBusyTooLongRetryError
WARNING:telethon.client.users:Telegram is having internal issues WorkerBusyTooLongRetryError: Telegram workers are too busy to respond immediately (caused by ForwardMessagesRequest)
WARNING:telethon.client.users:Telegram is having internal issues WorkerBusyTooLongRetryError: Telegram workers are too busy to respond immediately (caused by ForwardMessagesRequest)
WARNING:telethon.client.users:Telegram is having internal issues WorkerBusyTooLongRetryError: Telegram workers are too busy to respond immediately (caused by ForwardMessagesRequest)
WARNING:telethon.client.users:Telegram is having internal issues WorkerBusyTooLongRetryError: Telegram workers are too busy to respond immediately (caused by ForwardMessagesRequest)
WARNING:telethon.client.users:Telegram is having internal issues WorkerBusyTooLongRetryError: Telegram workers are too busy to respond immediately (caused by ForwardMessagesRequest)
WARNING:telethon.client.users:Telegram is having internal issues WorkerBusyTooLongRetryError: Telegram workers are
@x0x8x
x0x8x / telethon.client.users.http.py
Last active June 11, 2019 13:36
/usr/local/lib/python3.7/site-packages/Telethon-1.8.0-py3.7.egg/telethon/client/messages.py
WARNING:telethon.client.users:Telegram is having internal issues RpcCallFailError: Telegram is having internal issues, please try again later. (caused by SearchRequest)
WARNING:telethon.client.users:Telegram is having internal issues WorkerBusyTooLongRetryError: Telegram workers are too busy to respond immediately (caused by ForwardMessagesRequest)
WARNING:telethon.client.users:Telegram is having internal issues WorkerBusyTooLongRetryError: Telegram workers are too busy to respond immediately (caused by ForwardMessagesRequest)
WARNING:telethon.client.users:Telegram is having internal issues WorkerBusyTooLongRetryError: Telegram workers are too busy to respond immediately (caused by ForwardMessagesRequest)
WARNING:telethon.client.users:Telegram is having internal issues WorkerBusyTooLongRetryError: Telegram workers are too busy to respond immediately (caused by ForwardMessagesRequest)
WARNING:telethon.client.users:Telegram is having internal issues WorkerBusyTooLongRetryError: Telegram workers are too busy to
@x0x8x
x0x8x / errors.FloodWaitError.log
Created May 27, 2019 14:43
errors.FloodWaitError
ERROR:asyncio:Task exception was never retrieved
future: <Task finished coro=<parse_chat() done, defined at /opt/tg-vm2/parser/_methods.py:18> exception=TypeError('__init__() takes 1 positional argument but 2 were given')>
Traceback (most recent call last):
File "/opt/tg-vm2/parser/_methods.py", line 40, in parse_chat
await bot.forward_messages(to_chat, list(filter(None, rns)))
File "/usr/local/lib/python3.7/site-packages/Telethon-1.7.7-py3.7.egg/telethon/client/messages.py", line 866, in forward_messages
result = await self(req)
File "/usr/local/lib/python3.7/site-packages/Telethon-1.7.7-py3.7.egg/telethon/client/users.py", line 38, in __call__
raise errors.FloodWaitError(r, capture=diff)
TypeError: __init__() takes 1 positional argument but 2 were given
@x0x8x
x0x8x / TheSame_ParsedInnacuracy-WorkerBusyTooLongRetryError.js
Last active May 18, 2019 07:12
Expanded key errors on forward message (ForwardMessagesRequest)
(
from_peer=InputPeerChannel
(channel_id=1156378048, access_hash=4205097310848686955),
id=[45978, 45957, 45864, 45862, 45793, 45792, 45782, 45763, 45760, 45740, 45734, 45586, 44948, 44846, 44844, 44798, 44751, 44692, 44665, 44642],
to_peer=InputPeerChannel(channel_id=1373228793, access_hash=6327538305334599109),
silent=None,
background=None,
with_my_score=None,
grouped=False,
random_id=[-7867795124790377059, -5173376355708646424, 1297582176930052525, -1660645616368718338, 2931652650574017649, -6290013694620993567, -3267574684953232835, -2349874074705071688, -5332078965555311721, 5665124259770090605, -4591428117744845926, 4460849786024024788, 8518737235298762951, -4245539123969242832, 1587461114554332106, 8767834619513787345, 7934166498793639718, 3260551679120690356, 7787118189106454142, 4491009674009401814]) had missing message mappings Updates(updates=[UpdateMessageID(id=29407, random_id=-7867795124790377059),
@x0x8x
x0x8x / Install PyQt5 on Ubuntu with python3 .md
Created February 19, 2019 14:46 — forked from r00tdaemon/Install PyQt5 on Ubuntu with python3 .md
Install PyQt5 on Ubuntu with python3. Steps to set up PyQt5 (ubuntu). With python code generation

Installation

pip3 install --user pyqt5  
sudo apt-get install python3-pyqt5  
sudo apt-get install pyqt5-dev-tools
sudo apt-get install qttools5-dev-tools

Configuring to run from terminal

# run in "root" folder (e.g /home/datmusic/api.datmusic.xyz/)
chown -R datmusic:www-data storage .env
find storage -type f -exec chmod 664 {} \;
find storage -type d -exec chmod 775 {} \;
chgrp -R www-data storage .env
chmod -R ug+rwx storage .env