Skip to content

Instantly share code, notes, and snippets.

View ProfessorLogout's full-sized avatar

Marco Kamner ProfessorLogout

View GitHub Profile
@ProfessorLogout
ProfessorLogout / soloform.php
Created December 27, 2017 17:17
SoloForm Template Override For Joomla
<?php
/**
* @package Joomla.Site
* @subpackage com_contact
*
* @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;

Keybase proof

I hereby claim:

  • I am ProfessorLogout on github.
  • I am professorlogout (https://keybase.io/professorlogout) on keybase.
  • I have a public key whose fingerprint is 8E16 F772 842B CBEC 541A 735A BB83 7EF3 A541 B5C7

To claim this, I am signing this object:

# Aufgabe
Erstellung von Schulungsunterlagen für Auszubildende.
Erstellung einer per UML definierten Klassenhierarchie zur Arbeit mit Rechtecken und Linien.
# Überlegungen
- Wahl einer Programmiersprache
Da als Schulungsunterlage gedacht sollte eine möglichst leicht zu erlernende Programmiersprache verwendet werden.
Es wurde sich für Python3 entschieden, wodurch die theoretische unmöglichkeit von protected und private Variablen & Methoden entstand.
Eine Recherche in der Dokumentation der Sprache ergab, dass dies per Konvention durch prefixing mit "_" für protected und "__" für private Variablen & Methoden.
@ProfessorLogout
ProfessorLogout / WannaBe2048.py
Last active December 23, 2016 21:36
Implementing 2048 mechanics only using std-lib objects
"""Implementing the 2048 mechanic with stdlib-only tools"""
import random
LEFT = "L"
RIGHT = "R"
UP = "U"
DOWN = "D"
def create_board(size = 4):
"""Creating a list of lists defining the board.
@ProfessorLogout
ProfessorLogout / Timealazyer.py
Last active October 19, 2016 19:51
Gives you the lower degree between to pointers on a circular watch based on a HH:MM entrys
from datetime import time as t
DEGREE_MIN = 6
DEGREE_HOUR = 30
while True:
time = input("Please enter a timestamp!\nformatted like -> HH:MM\n>").split(":")
try:
mytime = t(hour=int(time[0]),minute=int(time[1]))
except:
print("Congratulations!\nYou are to dumb to enter a valid timestamp!\Retry it!")
@ProfessorLogout
ProfessorLogout / hangman.py
Last active August 23, 2016 12:37
Simple Hangman written in Python 3.5
import getpass
#Todo: ASCII art for the 7 hangman stages
HANGMAN = ["0","1","2","3","4","5","6"]
#If running in IDLE or any other IDE change "getpass.getpass" to input
WORD = list(getpass.getpass("Please input a word to play with!"))
DISPLAY = []
GUESSED = []
DISPLAY = ["?"] * len(WORD)