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
#!/usr/bin/python | |
#-*- coding: utf8 -*- | |
import sys | |
def draw_grid(cols, rows, cell_size=4): | |
for y in xrange(rows): | |
# draw horizontal line | |
sys.stdout.write(('+' + ' - ' * cell_size) * cols + '+\n') | |
# draw vertical lines |
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 -*- | |
""" | |
A tool for scrolling input text as ASCII art text banner in console | |
""" | |
import os | |
import time | |
from PIL import Image, ImageDraw, ImageFont | |
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
#!/usr/bin/evn python | |
# -*- coding: utf-8 -*- | |
import sys | |
import math | |
import struct | |
if sys.version_info > (3, 0): | |
basestring_type = str | |
else: |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
A script to get the version of Python by which the file was compiled | |
""" | |
from __future__ import print_function | |
import binascii | |
import os |
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
#!/usr/bin/evn python | |
# -*- coding: utf8 -*- | |
def encode_to_7bit(value): | |
""" | |
Encode unsigned int to 7-bit str data | |
""" | |
data = [] | |
number = abs(value) | |
while number >= 0x80: |
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
#!/usr/bin/env python | |
#-*- coding: utf-8 -*- | |
#----------------------------------------------------------------------- | |
# Author: delimitry | |
#----------------------------------------------------------------------- | |
import os | |
import sys | |
from PIL import Image | |
from argparse import ArgumentParser |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import os | |
import re | |
import requests | |
import sys | |
from Crypto.Cipher import AES | |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
A script to get the current list of CPython version's magic numbers from CPython repository. | |
It is parses "/Lib/importlib/_bootstrap_external.py" source file to get this list. | |
And this is a helper for my script: https://gist.github.com/delimitry/bad5496b52161449f6de, | |
which allows to get the version of Python by which the file was compiled | |
""" |