Skip to content

Instantly share code, notes, and snippets.

@maduck
maduck / getmod.py
Created October 2, 2012 09:00
Directory Listing with permission bits
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
import os
import stat
import argparse
import hashlib
parser = argparse.ArgumentParser(description='list files with file bits')
@maduck
maduck / snowstorm.py
Created February 24, 2018 15:44
a very small learning project to have a snowing screensaver.
#!/usr/bin/env python
"""a very small learning project to have a snowing screensaver."""
import random
import pygame.gfxdraw
class Snowflake:
"""Representation of a single snowflake."""
@maduck
maduck / unit_formatter.py
Last active March 22, 2018 09:47
Unit formatting python OOP kata.
#!/usr/bin/env python3
import math
class BaseFormatter(object):
"""
Provides a generic formatting class.
Just inherit from it, define your units,
and then use pretty_format with any number.
"""
@maduck
maduck / go_single_session.py
Created November 1, 2023 11:31
GTA Online single session enabler for Windows
import time
import psutil
from pywinauto import Application
class GTAProcess:
PROCESS_NAME: str = 'GTA5.exe'
def __init__(self):