Skip to content

Instantly share code, notes, and snippets.

View omamkaz's full-sized avatar
🎯
Focusing

Osama Mohammed omamkaz

🎯
Focusing
View GitHub Profile
@omamkaz
omamkaz / snake.py
Created April 29, 2022 22:02
Simple python console snake game
#!/usr/bin/python3
from sys import argv
from random import randint, choice
from time import strftime, sleep
from curses import (textpad, curs_set, KEY_RIGHT,
KEY_LEFT, KEY_DOWN, KEY_UP,
wrapper, COLOR_RED)
####################### start advanced config #########################
@omamkaz
omamkaz / env_path.py
Created April 29, 2022 21:56
print linux env paths
#!/usr/bin/python3
from os import getenv
_paths = getenv("PATH").split(":")
def print_type(title: str, _filter: tuple):
print(f"\n@{title.title()} dirs:")
for (index, fp) in enumerate(filter(lambda fp: fp.startswith(_filter), _paths), 1):
print(f"{index:3}- {fp}")