Skip to content
/ python Public
forked from Kartones/python

Python assorted code: small experiments, scripts and snippets

License

Notifications You must be signed in to change notification settings

cig0/python

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Assorted code

Miscellaneous Python code snippets and experiments.

Running

make shell

And then from inside the Python 3.7 container install and run whatever you want.

Note: Only basic python 3.7, pytest and flake8 are installed.

Miscellaneous

  • \double-linked-list: A Python implementation of a double linked list, with sorting, reversing, item flipping and inserting at specific position (by data).
  • \list_search.py: Old search prototype for a command-line provided string in all txt files of folder where script is launched. Sample text files format:
0   /media/kartones/pre1/test 1/blablabla
123 /media/kartones/pre1/test 1/blablabla2
0   /media/kartones/pre1/test 1
0   /media/kartones/pre1/test 2/blablabla
0   /media/kartones/pre1/test.1/blablabla
  • \pelican\plugins: Some plugins I've built for the Pelican static site generator tool.
  • \pelican\blogengine_to_pelican.py: Tool to migrate from BlogEngine.Net to Pelican (posts and pages).
  • \pelican\publisher: Tool to allow post-processing of Pelican builds and optionally upload a post via FTP.
  • \shopping-cart-with-discounts: Tiny implementation of a shopping cart with an extensible discounts system.
  • \shopping-lists: A pet project to easily manage shopping lists. Mobile-friendly although nothing too complex nor feature-full. See its README for more details.
  • \trello-backup: Script to export your trello boards as json files, plus all attachments. One folder per board with data inside.
  • \twitter-purge: Script to delete your tweets older than X days (5 with sample config). Best setup as a cron job to run hourly or daily.
  • \weather-email: (No longer works) Small script that fetches Madrid's current weather info and sends it via email. Perfect to be setup as a cron job at 7AM to remind me daily of the weather before I head out for work.

Games & Gaming Related

Barnsley Fern fractal

  • \game-of-life-kata: A coding kata. Inside-out TDD approach + PyGame "visualizer":

sample game of life run

  • \fire-effect.py: Python/Pygame implementation of Doom PSX fire effect:

Doom PSX fire effect in pygame

  • \flappy-kirby: Pygame Zero Flappy Bird game clone (with some classic graphics):

Flappy Kirby screenshot

  • \imdb-random-name: Obtain a random movie name, using IMDB datasets. Includes a fetch script that retrieves and prepares the latest data.

  • \pic-to-png: Exporter from Oper Soft's old MS-DOS games .PIC files to .PNG images. More info at this blogpost & part 2:

Mutan Zone main screen Abadia del Crimen main screen

  • \rpg-combat-kata: A coding kata. I went for an inside-out TDD approach, building only the minimal needed functionality.

  • \transarctica-battles: A prototype of re-imagining of the battles section of the MS-DOS and AMIGA game Transarctica. Also an experiment with Pygame to learn about screen resizing. Totally WIP.

Transarctica Battles screenshot

About

Python assorted code: small experiments, scripts and snippets

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 94.0%
  • HTML 5.0%
  • Other 1.0%