Skip to content

Instantly share code, notes, and snippets.

View playwright-vcdts.py
import re
from playwright.sync_api import Page, expect
import pytest
@pytest.fixture(scope="function", autouse=True)
def goto_vcd_page(page: Page):
print("before the test runs")
page.goto("http://localhost:5173")
yield
print("after the test runs")
View diff_to_ave.py
import pandas as pd
input_file = "migrated_input.xlsx"
output_file = "migrated_output.xlsx"
def average_last_ten(df: pd.DataFrame):
last_ten = df.tail(n=10)
average = last_ten["columnB"].mean()
return average
@raspberrypisig
raspberrypisig / install.bat
Last active December 5, 2023 06:42
pandas python
View install.bat
pip install -r requirements.txt
View vscode-portable-bootstrap.py
import requests
from pathlib import Path
from zipfile import ZipFile
import tempfile
VSCODE_URL = "https://code.visualstudio.com/sha/download?build=stable&os=win32-x64-archive"
OUTPUT_FOLDER = "vscode-boo"
def download_file(url, output_file):
# NOTE the stream=True parameter below
View zte268a.py
import requests
import time
import xml.etree.ElementTree as ET
import hashlib
import re
timestamp = round(time.time() * 1000)
URL = "http://192.168.20.1/"
USER = "admin"
PASSWORD = "PUT_PASSWORD_HERE"