This file contains hidden or 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 re | |
import sys | |
import os.path | |
import datetime | |
import urllib.request | |
from os.path import expanduser | |
def get_news_page(): | |
try: |
This file contains hidden or 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
\documentclass[9pt, notumble]{leaflet} | |
\usepackage{amssymb} | |
\usepackage[T1]{fontenc} | |
\usepackage[russian]{babel} | |
\usepackage[useregional]{datetime2} | |
\usepackage[utf8]{inputenc} | |
\usepackage{graphicx} | |
\usepackage{stix} | |
\usepackage{textcomp} | |
\usepackage[unicode=true,colorlinks=true]{hyperref} |
This file contains hidden or 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
# Based on https://gist.github.com/fernandoaleman/5083680 | |
# Start the old vagrant | |
$ vagrant init ubuntu_saucy | |
$ vagrant up | |
# You should see a message like: | |
# [default] The guest additions on this VM do not match the install version of | |
# VirtualBox! This may cause things such as forwarded ports, shared | |
# folders, and more to not work properly. If any of those things fail on |
This file contains hidden or 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
#!/bin/bash | |
JAILS=`fail2ban-client status | grep "Jail list" | sed -E 's/^[^:]+:[ \t]+//' | sed 's/,//g'` | |
for JAIL in $JAILS | |
do | |
fail2ban-client status $JAIL | |
done |
This file contains hidden or 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# Process map data from ATO map | |
# map URL is: | |
# http://infolight.org.ua/thememap/karta-obstriliv-ta-boyovyh-diy-u-zoni-ato-second-edition | |
""" | |
The MIT License (MIT) | |
Copyright (c) 2016 Renat Nasridinov, <[email protected]> |
This file contains hidden or 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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
import re | |
from os import scandir | |
import sys | |
reg_exp = re.compile('в (м.\s?[А-Я][а-яіїє]+?)\s.+(по\s+[А-Я][а-яіїє]+?\sшосе\,?\s?\d{1,2}[а-яіїє]?)') |
This file contains hidden or 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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
# edrpou.py | |
""" | |
Перевірка контрольних розрядів: | |
ЄДРПОУ | |
ІПН | |
ТРДПАУ |
This file contains hidden or 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
# Регистронезависимый LIKE в SQLite для кириллицы | |
Original is [here](https://medium.com/@eigenein/%D1%80%D0%B5%D0%B3%D0%B8%D1%81%D1%82%D1%80%D0%BE%D0%BD%D0%B5%D0%B7%D0%B0%D0%B2%D0%B8%D1%81%D0%B8%D0%BC%D1%8B%D0%B9-like-%D0%B2-sqlite-%D0%B4%D0%BB%D1%8F-%D0%BA%D0%B8%D1%80%D0%B8%D0%BB%D0%BB%D0%B8%D1%86%D1%8B-95e3e33e8ad) | |
При использовании `LIKE` или `ORDER BY` в SQLite с Unicode-символами может возникнуть проблема, связанная с неспособностью SQLite по умолчанию правильно воспринимать разные регистры одной и той же буквы: | |
sqlite> select "ы" like "ы"; | |
1 | |
sqlite> select "Ы" like "ы"; | |
0 |
This file contains hidden or 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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
# Copyright (c) 2017 Renat Nasridinov | |
# This software may be freely distributed under the MIT license. | |
# https://opensource.org/licenses/MIT The MIT License (MIT) | |
import argparse | |
import json | |
import os |
This file contains hidden or 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
' Adapted to MSO 2016 with Windows-1251 solution from | |
' https://goo.gl/FwYgMp | |
Public Sub ToggleSmartQuotes() | |
Dim rCell As Range | |
Dim sText As String | |
Dim sPattern1 As String | |
Dim sPattern2 As String | |
sPattern1 = "*[" & Chr(34) & Chr(39) & "]*" |