Skip to content

Instantly share code, notes, and snippets.

View ridgewell's full-sized avatar

William Chen ridgewell

View GitHub Profile
@ridgewell
ridgewell / tuition-tax-credit-calculator.py
Created April 29, 2023 03:30
Canadian Tuition Tax Credit Calculator
# Define a function that takes a province code and returns the provincial tax rate
def get_provincial_tax_rate(province):
# A dictionary mapping province codes to provincial tax rates
provincial_tax_rates = {
'AB': 10.0,
'BC': 5.06,
'MB': 10.8,
'NB': 9.68,
'NL': 8.7,
'NT': 5.9,
@ridgewell
ridgewell / extract-mysterium-network-to-csv.py
Created March 24, 2023 19:28
Extract Mysterium VPN nodes to a CSV File
import requests
import csv
# Make a request to the API
response = requests.get('https://discovery.mysterium.network/api/v3/proposals')
# Extract the JSON data
data = response.json()
# Create a CSV file and write the data to it
@ridgewell
ridgewell / scrape_parl_gc_questions.py
Last active February 28, 2023 04:56
Scrape written parliamentary question data from House of Commons (Canada) Order Paper
import requests
from bs4 import BeautifulSoup
# Send a GET request to the webpage
url = 'https://www.ourcommons.ca/DocumentViewer/en/44-1/house/sitting-160/order-notice/page-9'
response = requests.get(url)
# Create a BeautifulSoup object to parse the HTML content
soup = BeautifulSoup(response.content, 'html.parser')
sudo apt-get install network-manager-openvpn
sudo apt-get install network-manager-openvpn-gnome
@ridgewell
ridgewell / vpn_psk_bingo.md
Last active April 11, 2018 02:42 — forked from kennwhite/vpn_psk_bingo.md
Most VPN Services are Terrible