Skip to content

Instantly share code, notes, and snippets.

View adam-sas-on's full-sized avatar
💻
No AI assistance, no time ⌚

Adam Sz. adam-sas-on

💻
No AI assistance, no time ⌚
View GitHub Profile
@adam-sas-on
adam-sas-on / c_curses_example.c
Last active November 22, 2020 14:33
A simple example to use whole terminal screen in C (same as python example but in C language).
#include <ncurses.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
/*
* https://gist.github.com/adam-sas-on/
*/
@adam-sas-on
adam-sas-on / python_curses_example.py
Created May 28, 2020 15:17
A simple example to use whole terminal screen in python
import curses
import random
def rand_range(width, height):
return (random.randint(0, width), random.randint(0, height) )
#
def run(stdscr):
stdscr = curses.initscr()