This file contains 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 os | |
def getFiles(): | |
counter = 0 | |
code = {} | |
for file in os.listdir(path): | |
if file.endswith(".py"): | |
with open(file, "r") as myfile: | |
code[counter] = myfile.readlines() | |
counter += 1 |
This file contains 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 urllib2 | |
from BeautifulSoup import BeautifulSoup | |
url = 'https://www.explainxkcd.com/wiki/index.php?title=1:_Barrel_-_Part_1&oldid=129291' | |
req = urllib2.Request(url, headers={'User-Agent' : "Magic Browser"}) | |
response = urllib2.urlopen(req) | |
soup = BeautifulSoup(response, 'html.parser') | |
print soup.getText() |
This file contains 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
/** * * Beschreibung * Ich hasse Java * Top Kek m8 * @version 1.0 vom 30.09.2016 * @author Ich */import java.util.Scanner;import java.util.Arrays;import java.util.Random;public class Rechner { static Scanner sc = new Scanner(System.in); // neuer scanner static boolean var = false; static float ergebnis = 0; static float[] arrgebnis; public static void main(String[] args) { System.out.println("Guten Tag. Dies ist ein deutscher Taschenrechner/Sortierer."); // Gruß Abfrage(); } // end of main public static void Abfrage() { System.out.print("Was möchten Sie tun? (help für Hilfe)"); // Frage nach Operation; String Operation = sc.nextLine(); switch (Operation) { // Verteiler je nach Eingabe case "achterbahn": //(achterbahn) ergebnis = Achterbahn(var); break; case "addition": // addition ergebnis = Addition(var, ergebnis); break; case "subtraktion": // subtraktion ergebnis = Subtraktion(var); break; case "multiplikation": // multiplikation ergebnis = Multiplikation(var); br |
This file contains 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 math | |
import os | |
import time | |
clear = lambda: os.system('cls') | |
base = 1.5 | |
def rollercoaster(): | |
start = raw_input("Start: ") |
This file contains 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
// Y1 13 | |
// Y2 12 | |
// Y3 11 | |
// X1 10 | |
// X2 9 | |
// X3 8 | |
long last_update = 0; | |
unsigned long last_frame = 0; |
This file contains 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 pyaudio | |
import math | |
import string | |
PyAudio = pyaudio.PyAudio | |
p = PyAudio() | |
morse_code = {'A': '.-', 'B': '-...', 'C': '-.-.', | |
'D': '-..', 'E': '.', 'F': '..-.', | |
'G': '--.', 'H': '....', 'I': '..', |
This file contains 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
>>>, | |
[<<+>>>>>++++++++++++++++++++++++++++++++++++++++++++++++>++++++++++++++++++++++++++++++++++++++++++++++++>++++++++++++++++++++++++++++++++++++++++++++++++<<<<< initialize memory | |
> read input | |
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++< set up memory for 100s | |
[+>+<[->-[>]<<]<[ if a is greater or equal to b then | |
- >>>>>+ add one at 100s place | |
<<++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++<< put b back to 100 | |
]<[ else | |
- >> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > [-<->] <<<+<reset a to value before checking | |
] +>> put back one so another loop can happen |
This file contains 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
+ | |
[ | |
>[<] | |
<[>,>]< | |
[ | |
-----------------------------------------------------------> check if char is a semicolon | |
]< | |
[ | |
+++++++++++ if its not a semicolon convert it into a number | |
>> |
This file contains 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
>, | |
[[<+> set our "check value" to 1; | |
--------------------------------- if its not a ! | |
[---------- if its not a plus | |
[- if its not a comma | |
[- if its not a minus | |
[- if its not a full stop | |
[-------------- if its not a less than | |
[-- if its not a greater than | |
[----------------------------- if its not a open sqare bracket |
OlderNewer