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
from typing import Dict, List | |
from moodle_dl.config import ConfigHelper | |
from moodle_dl.moodle.mods import MoodleMod | |
from moodle_dl.types import Course, File | |
class LTIMod(MoodleMod): | |
MOD_NAME = 'lti' | |
MOD_PLURAL_NAME = 'ltis' |
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 zipfile | |
import os | |
import sys | |
import pathlib | |
def create_zip(course_path, maintain_hierarchy = False): | |
ziped_submissions_path = os.path.join(course_path, 'submissions.zip') | |
# creating zip file with write mode | |
zip_file = zipfile.ZipFile(ziped_submissions_path, 'w', zipfile.ZIP_DEFLATED) | |
# Walk through the files in a directory |
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 re | |
def sanitize_filename(s): | |
"""Sanitizes a string so it could be used as part of a filename.""" | |
def replace_insane(char): | |
if char == '\n': | |
return ' ' | |
elif char == '?' or ord(char) < 32 or ord(char) in [127, 173]: | |
return '' | |
elif char == '"': | |
return '\'' |
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
# Original Author: Davide Mastromatteo | |
# Source: http://thepythoncorner.com/dev/how-create-telegram-bot-in-Python/ | |
# Make sure you have adapted the `storage_path` and the `TOKEN` below. | |
import datetime | |
import math | |
from moodle_dl.main import run_main | |
from telegram.ext import Updater, CommandHandler, MessageHandler, Filters | |
# function to handle the /start command |
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 python3 | |
def berechnen_von_Fourier(funktions_werte: []): | |
""" | |
Die Anzahl der funktions_werte muss eine Potenz von 2 sein. | |
""" | |
n = len(funktions_werte) | |
schritt = 1 |
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 python3 | |
def berechnen_von_ANF(funktions_werte: []): | |
""" | |
Die Anzahl der funktions_werte muss eine Potenz von 2 sein. | |
""" | |
n = len(funktions_werte) | |
schritt = 1 |
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 | |
def enc(block: str, key: str) -> str: | |
if (len(block) != 5): | |
print("Length does not match!") | |
result = "" | |
for i in range(5): | |
index = 4 - int(key[i: i + 1]) |
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 | |
""" y selects Array and x selects Elemnt || (xy)""" | |
substitute_table = [["63", "CA", "B7", "04", "09", "53", "D0", "51", | |
"CD", "60", "E0", "E7", "BA", "70", "E1", "8C"], | |
["7C", "82", "FD", "C7", "83", "D1", "EF", "A3", | |
"0C", "81", "32", "C8", "78", "3E", "F8", "A1"], | |
["77", "C9", "93", "23", "2C", "00", "AA", "40", | |
"13", "4F", "3A", "37", "25", "B5", "98", "89"], | |
["7B", "7D", "26", "C3", "1A", "ED", "FB", "8F", |
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
#Made for 35c3 by c0d3d3v | |
from random import * | |
import socket | |
import traceback | |
import pygame | |
from pygame import gfxdraw | |
import time | |
from Tkinter import Tk, Canvas, PhotoImage, mainloop, Frame | |
import re | |
import thread |
NewerOlder