Author image

Alien Space Battle - Space Invaders lookalike Game


A 2d Space Invaders game clone.

Wanting to get more familiar with Pygame - a very popular Python game library I made this. Pygame hides many of the down and dirty implementation details and all you're basically left to do is create the game logic. If you want to do something similar this project will surely help you.

Author image

Install Python Packages script


Merely a handy run-and-forget script that installs all python packages specified in a text file “packages.txt”. I've used it countless times. Press a button and let the console ASCII text flow!

You will more than likely need to run the script (or Visual Studio if you're using that to run it) with administrator privileges, otherwise you'll be denied permission to install packages.

Requirements:

  • Python 3.x version installed (only tested with 3.5 and 3.6.6)
  • Latest pip version for the specified python version installed

I've used Windows 8.1 x86_64, Visual Studio 2017 IDE with Python tools and Python 3.6.6 interpreter.

Github

Github repository link.

Author image

Pybind 11 Tutorial


Pybind11 is a lightweight header only library that exposes c++ types in Python. 8k lines entire library. 5k LOC core codebase. You can use it to extend python with C/C++ written python extensions - similar to CPython but in a much easier and up-to-date method. Or you can embed the python interpreter in C++ allowing for python scripting in a C++ application. It goes both ways it's not particularly hard and you basically get to marry the Beauty and the Beast together (and C++ is not the beauty..).

Tip:

If you don't have a python distribution installed on your system you can extract the python36.zip and python36.dll from the pybinding\x64\Debug\python-3.6.6-embed-amd64.zip file and place them on the same directory as the output executable. They will work exactly the same.


pybind_module is a static library project configured...

Author image

Snake Applesken - Python PyGame & cx_Freeze Tutorial


I had to do my own take of the classic Snake game I played back in the day on Nokia 3310 and Sony Ericsson W810i.

If you want some implementation help on how I went about to do this I hereby give you my notes below:

Author image

Valiant Keygen


A keygen written in Python, released for educational purposes.

A key generator, or keygen for short, is a program, used in cryptography, that aims to beget a random number that can be used for encryption and decryption at 2 ends of a communication channel.

Brief walkthrough the code: We create a string key given a number of possible characters (here all alphanumeric chars in caps and without, as well as all 10 numbers) and we compute its checksum through a trivial hash function here (ord). We accumulate the result and we crosscheck with foundValueThroughDbg to figure out if the number we found has any relevance to the value found through the debugger. If we find at...

1