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 necessary packages for webscraping. | |
from dataclasses import replace | |
from bs4 import BeautifulSoup | |
from urllib import request | |
from dateutil.parser import parse | |
import time | |
import random | |
import os | |
import re |
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
# Python 2 | |
import os | |
from subprocess import call | |
from pydub import AudioSegment | |
def manifest(directory, extension=None): | |
# gives all the file names in the directory. | |
for (root, _, files) in os.walk(directory): |
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
# stick in the root of your directory, then you can import it as a package to be added to the end of a long process. | |
# Be sure to add notification.py to your .gitignore file to prevent accidentally sharing sensitive personal information. | |
# ===== | |
# In file that takes forever to run | |
# At top of file | |
import notification | |
# As last line before file end | |
notification.email_notification_on_completion() |
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 | |
from PIL import Image | |
def all_files(dirname): | |
for (root, _, files) in os.walk(dirname): | |
for fn in files: | |
yield os.path.join(root, fn) | |
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
#searchform{ | |
border-radius:0px; | |
border-top: 1px solid #E3E3E3; | |
border-left: 1px solid #E3E3E3; | |
border-right: 1px solid #E3E3E3; | |
border-bottom: 1px solid #E3E3E3; | |
} |
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
// Piezo speaker connected to pins | |
int speakerPin = 6; | |
// RGB LED leads connected to PWM pins | |
const int RED_LED_PIN = 9; | |
const int GREEN_LED_PIN = 10; | |
const int BLUE_LED_PIN = 11; | |
// Used to store the current intensity level of the individual LEDs | |
int redIntensity = 0; | |
int greenIntensity = 0; |