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 codecs | |
import glob | |
import os | |
import sys | |
def parse(file, encoding="utf-8-sig"): | |
fp = codecs.open(file, "r", encoding=encoding) | |
lines = fp.readlines() | |
fp.close() |
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 argparse | |
import os | |
import re | |
from pathvalidate import sanitize_filename | |
from canvasapi import Canvas | |
from canvasapi.course import Course | |
from canvasapi.exceptions import Unauthorized, ResourceDoesNotExist | |
from canvasapi.file import File | |
from canvasapi.module import Module, ModuleItem |
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 argparse | |
import os.path | |
import shutil | |
from urllib.parse import unquote | |
import pathvalidate | |
import requests_html | |
class Scraper: |
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 os import system, listdir, chdir | |
import random | |
for current_row in range(9): | |
images = [] | |
for i in range(16): | |
images.append("artistart\\" + random.choice(listdir("artistart"))) | |
print(images) |
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
<?php | |
// Class to send a message via Telegram | |
class Telegram | |
{ | |
function sendMessage($id, $text, $location = null) | |
{ | |
$loop = \React\EventLoop\Factory::create(); | |
$handler = new HttpClientRequestHandler($loop); | |
$tgLog = new TgLog(TELEGRAM_KEY, $handler); |
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
<?php | |
/** | |
* Class FlitsLogic | |
* | |
* Class to get radars from flitsservice.nl, and parse the points to check whether they are within a certain distance. | |
* | |
* @author Koen van Hove | |
* @license MIT | |
* (Though it would be really nice if you left a message if you decided to use this, and perhaps even credited me) | |
*/ |
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
<?php | |
/* | |
* Because the actual streaming URLs from StreamTheWorld.com stations change often, | |
* this script will dynamically redirect you to the stream URL. | |
* | |
* Do with it what you want :-) | |
* Koen (koenvh.nl) | |
* | |
* Usage: Provide a "sign" argument in your get request. | |
* This is the station's sign, which is the part after the slash without the (AAC)_SC part. |