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
""" | |
Sync Canvas assignments to Todoist and send alerts to Discord. | |
""" | |
import requests | |
from datetime import datetime | |
import os | |
from typing import List, Dict, Tuple |
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
""" | |
Description: | |
This script scrapes the LEGO website for new, pre-order, coming soon, available, out of stock, and back order sets. It sends notifications to a Discord channel when new sets are found or when the status of existing sets changes. The script uses BeautifulSoup for web scraping and requests for making HTTP requests. It also uses a JSON file to keep track of notified sets and their statuses. | |
Functions: | |
- setup_storage(): Initializes the storage file for notified sets if it doesn't exist. | |
- load_notified_sets(): Loads the notified sets from the storage file. | |
- save_notified_sets(notified_sets): Saves the notified sets to the storage file. | |
- is_set_notified(set_id, notified_sets): Checks if a set has already been notified. | |
- mark_set_as_notified(set_id, status, notified_sets): Marks a set as notified and saves the status. | |
- send_discord_notification(set_name, set_image, set_price, set_url, status): Sends a notification to a Discord channel. |
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
% Define the week | |
day(sunday). | |
day(monday). | |
day(tuesday). | |
day(wednesday). | |
day(thursday). | |
day(friday). | |
day(saturday). | |
% Define the workouts that must be separated |
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
javascript:const settings={feed:!0,fightFire:!0,captcha:!0,geo:!0,chess:!0,elements:!0};(function(){function l(u,i){var d=document;if(!d.getElementById(i)){var s=d.createElement('script');s.src=u;s.id=i;d.body.appendChild(s);s.addEventListener('load',fireWatch);s.addEventListener('load',feed);s.addEventListener('load',starter);s.addEventListener('load',captcha);s.addEventListener('load',geo);s.addEventListener('load',chess);s.addEventListener('load',elements)}}l('//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js','jquery');let previous='';function fireReplacer(match,offset){console.log(previous+' '+previous.charAt(offset));return previous.charAt(offset)}function fireWatch(){let timeout=setTimeout(fireWatch,200);if(settings.fightFire==true&&$('.ProseMirror p:first-child')[0].innerText.match('🔥')!=null){$('.ProseMirror p:first-child')[0].innerText=$('.ProseMirror p:first-child')[0].innerText.replace('🔥',fireReplacer);settings.fightFire=0;clearTimeout(timeout)}previous=$('.ProseMirror p:first-child')[0 |
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
/* Magic Mirror | |
* Module: MMM-Petfinder | |
* | |
* By Mykle1 | |
* | |
*/ | |
Module.register("MMM-PetFinder", { | |
// Module config defaults. | |
defaults: { |