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 pandas as pd | |
import sqlite3 | |
conn = sqlite3.connect('/path/to/where/you/want/to/store/your/db') | |
c = conn.cursor() | |
df = pd.DataFrame([{'Column1':'Data','Column2':'Base'}]) | |
df.to_sql("SQLDatabase", conn, if_exists="replace") |
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 smtplib, ssl | |
import settings | |
message = """\ | |
Subject: Here I am. | |
This message was sent from Python.""" | |
def send_gmail(message): | |
port = 465 # For SSL |
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
# Download entire webpage including all javascript, html, css of webpage. Replicates ctrl+s when on a webpage. | |
from selenium.webdriver.common.action_chains import ActionChains | |
from selenium.webdriver.common.keys import Keys | |
def save_current_page(): | |
ActionChains(browser).send_keys(Keys.CONTROL, "s").perform() |
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
# https://www.mathsisfun.com/combinatorics/combinations-permutations-calculator.html | |
b1 = 'b1' | |
b2= 'b2' | |
b3='b3' | |
b4='b4' | |
b5='b5' | |
b6='b6' | |
a1 = [b1],[b2],[b3],[b4],[b5],[b6] | |
a2 = [b1,b2],[b1,b3],[b1,b4],[b1,b5],[b1,b6],[b2,b3],[b2,b4],[b2,b5],[b2,b6],[b3,b4],[b3,b5],[b3,b6],[b4,b5],[b4,b6],[b5,b6] |
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
⏰ Stats for December 20th 2020 | |
Productivity Pulse 4h 53m ███████▏░░ 72% | |
All Productive 4h 30m █████████▏ 92% | |
All Distracting 1m 49s ░░░░░░░░░░ 1% | |
Neutral 21m 20s ▋░░░░░░░░░ 7% |