View maze-gen.py
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
import png | |
import sys | |
import time | |
import math | |
import random | |
import argparse | |
import svgwrite | |
class Point2d: |
View retro-rocket.py
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
"""Formula used: Frequency / Sample_rate * 10 * math.sqrt(x) | |
x is [0, Duration * Sample_rate) | |
""" | |
import wave | |
import struct | |
import math | |
def fpart(val): |
View gist:183b0623d2402dc53f5982dac867b0c0
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
#include <stdlib.h> | |
#include <unistd.h> | |
#include <stdio.h> | |
#include <fcntl.h> | |
#include <linux/fb.h> | |
#include <sys/mman.h> | |
#include <sys/ioctl.h> | |
#include <stdint.h> | |
#include <stdbool.h> | |
#include <linux/input.h> |
View ansi-cols.py
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
r"""Prints random 24-bit colors(3 char width) | |
to the terminal using ansi escsape codes. | |
Use like: | |
python ansi-cols.py NO_OF_COLORED_CELLS | |
Example: | |
python ansi-cols.py 69_420 | |
""" |