Skip to content

Instantly share code, notes, and snippets.

View popcmp's full-sized avatar
:shipit:
I may be slow to respond.

Mikhail popcmp

:shipit:
I may be slow to respond.
  • /dev/null/
View GitHub Profile
@popcmp
popcmp / parse_google_block_for_keenetik.py
Last active April 18, 2025 19:03
Парсер используемых подсетей гугла для настройки статических маршрутов в роутере
import requests
SUBNETS = { "32": "255.255.255.255",
"31": "255.255.255.254",
"30": "255.255.255.252",
"29": "255.255.255.248",
"28": "255.255.255.240",
"27": "255.255.255.224",
"26": "255.255.255.192",
"25": "255.255.255.128",
"24": "255.255.255.0",
@popcmp
popcmp / read_write.py
Created May 22, 2021 09:33
Read write utf-8 in Python3 best way
with open(filename, 'r', encoding='utf8') as f:
text = f.read()
# process Unicode text
with open(filename, 'w', encoding='utf8') as f:
f.write(text)
@popcmp
popcmp / vk_deanon.py
Created May 26, 2018 17:23
Деанон в Вконтакте по ссылке на картинку
import vk_api
def parse_ids(group_id, tools):
ids = tools.get_all('groups.getMembers', 1000, {'group_id': group_id})
ids = ids['items']
return ids
def main():
#Ввод данных пользователей с клавиатуры
group_id = input('Введите ид группы\n')
short_id = input('Введите короткий ид из урл картинки \n')
#Словарь где будут найденные ид
@popcmp
popcmp / sobaki.py
Last active August 3, 2017 20:01
Удаление собачек из групп Вконтакте Python
import vk_api
def captcha_handler(captcha):
key = input("Enter Captcha {0}: ".format(captcha.get_url())).strip()
return captcha.try_again(key)
def find_dogs(group_id, tools):
ids = tools.get_all('groups.getMembers', 1000, {'group_id': group_id, 'fields' : 'users'})
ids = ids['items']
sobaki = []
for sobaka in ids:

Keybase proof

I hereby claim:

  • I am liberbear on github.
  • I am liberbear (https://keybase.io/liberbear) on keybase.
  • I have a public key whose fingerprint is 0C77 AD5B EBF8 1CB3 8CD2 A30D 5C6C 5694 865F 855F

To claim this, I am signing this object:

@popcmp
popcmp / lxml example
Created August 16, 2016 21:15 — forked from Artem-Mamchych/lxml example
Пример использования lxml
# coding: utf8
xml = '''<?xml version="1.0" encoding="UTF-8"?>
<soft>
<os>
<item name="linux" dist="ubuntu">
This text about linux
</item>
<item name="mac os">
Apple company