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
def generate_shortname(s): | |
"""generate all the possible short name of s | |
where the output should be a subsequence of s containing the first letter of s. | |
s : original name (string) | |
""" | |
assert len(s)>=2, "The length of the string should be at least 2." | |
t0, *t = s | |
len_t = len(t) | |
oo = [] |
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
# request analysis with selenium, without fiddler | |
# references: | |
# https://stackoverflow.com/a/63732179 | |
# https://stackoverflow.com/a/27644635 | |
# https://stackoverflow.com/a/69931030 | |
from selenium import webdriver | |
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities | |
import json |
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 smtplib for the actual sending function | |
import smtplib | |
import getpass | |
# Import the email modules we'll need | |
from email.message import EmailMessage | |
# Create a text/plain message | |
msg = EmailMessage() | |
msg.set_content('Testing email notification with python!') |
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
# https://gist.github.com/Bilka2/5dd2ca2b6e9f3573e0c2defe5d3031b2 | |
# https://www.reddit.com/r/Discord_Bots/comments/iirmzy/how_to_send_files_using_discord_webhooks_python/ | |
import requests | |
webhook_url = "Insert Webhook URL" # discord webhook url | |
# test? | |
# result = requests.get(webhook_url) |
OlderNewer