D7net Mini Sh3LL v1
Current File : //libx32/../share/snapd/../locale/ia/../../doc/info/../libroken18-heimdal/../usbmuxd/../liberror-perl/../grub2-common/../libjpeg8/../php7.4-mysql/../gnupg/../python3-apt/../netplan.io/../wget/../libcurl3-gnutls/../libthai-data/../python3-six/../screen/../maria/../libxaw7/../libmnl0/../netplan/../gdisk/../systemd-sysv/../grep/../udisks2/../libacl1/../libxmlb1/../libperl5.30/../automake/../libmpfr6/../python3-distro/../nano/../ufw/../unzip/../ed/../libklibc/../libcdt5/../libsepol1/../libbinutils/../autoconf/../libcurl3-gnutls/../diffutils/../lz4/../libsystemd0/../iptables/../libplymouth5/../libdrm2/../libblockdev-part2/../net-tools/../friendly-recovery/../python3-idna/../libdb5.3/../libp11-kit0/../mariadb-server-10.3/../python3-colorama/examples/demo06.py |
# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
from __future__ import print_function
import fixpath
import colorama
from colorama import Fore, Back, Style
from random import randint, choice
from string import printable
# Demonstrate printing colored, random characters at random positions on the screen
# Fore, Back and Style are convenience classes for the constant ANSI strings that set
# the foreground, background and style. The don't have any magic of their own.
FORES = [ Fore.BLACK, Fore.RED, Fore.GREEN, Fore.YELLOW, Fore.BLUE, Fore.MAGENTA, Fore.CYAN, Fore.WHITE ]
BACKS = [ Back.BLACK, Back.RED, Back.GREEN, Back.YELLOW, Back.BLUE, Back.MAGENTA, Back.CYAN, Back.WHITE ]
STYLES = [ Style.DIM, Style.NORMAL, Style.BRIGHT ]
# This assumes your terminal is 80x24. Ansi minimum coordinate is (1,1).
MINY, MAXY = 1, 24
MINX, MAXX = 1, 80
# set of printable ASCII characters, including a space.
CHARS = ' ' + printable.strip()
PASSES = 1000
def main():
colorama.init()
# gratuitous use of lambda.
pos = lambda y, x: '\x1b[%d;%dH' % (y, x)
# draw a white border.
print(Back.WHITE, end='')
print('%s%s' % (pos(MINY, MINX), ' '*MAXX), end='')
for y in range(MINY, 1+MAXY):
print('%s %s ' % (pos(y, MINX), pos(y, MAXX)), end='')
print('%s%s' % (pos(MAXY, MINX), ' '*MAXX), end='')
# draw some blinky lights for a while.
for i in range(PASSES):
print('%s%s%s%s%s' % (pos(randint(1+MINY,MAXY-1), randint(1+MINX,MAXX-1)), choice(FORES), choice(BACKS), choice(STYLES), choice(CHARS)), end='')
# put cursor to top, left, and set color to white-on-black with normal brightness.
print('%s%s%s%s' % (pos(MINY, MINX), Fore.WHITE, Back.BLACK, Style.NORMAL), end='')
if __name__ == '__main__':
main()
AnonSec - 2021 | Recode By D7net