This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# coding: utf8 | |
from __future__ import print_function | |
''' | |
HTW AI Bachelor | |
§9 Berechnung des Gesamtprädikats | |
http://ai-bachelor.htw-berlin.de/fileadmin/HTW/Alle/Amtliche_Mitteilungsblaetter/2012/30_12.pdf | |
''' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
with open(sys.argv[1]) as source, open('ln_' + sys.argv[1], 'w') as target: | |
for i, line in enumerate(source): | |
target.write('{:02d}{}'.format(i,line[2:])) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
This Auto-SConstruct takes alle *.cpp files of the current directory - the directory the SContruct is placed in. | |
The program name is based on the name of a file ending with '_main.cpp'. | |
Example: 'myprog_main.cpp' -> 'myprog' | |
If there is a file eding with '_test.cpp' a google testprogram is compiled with a similar naming process. | |
Example: 'mytest_main.cpp' -> 'mytest' | |
author: Tammo Behrends (2013) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
typedef char* string; | |
string encrypt(int offset, string text); | |
string decrypt(int offset, string text); | |
/* Programmaufruf: ceasar [-d|-e] [offset] [text ...] |
NewerOlder