Skip to content

Instantly share code, notes, and snippets.

View josephlou5's full-sized avatar

Joseph Lou josephlou5

View GitHub Profile
@josephlou5
josephlou5 / current_sheet_name.md
Created November 16, 2025 02:50
Formula to get the name of the current sheet in Google Sheets

How to get the current sheet's name in Google Sheets

Lots of people have suggestions at https://stackoverflow.com/q/45502538. Some of those answers inspired the methods I provide below.

Both methods require a way to parse a sheet name from a cell reference. To do this, we'll add a named function.

Go to "Data > Named functions", click "Add New Function", and input the

@josephlou5
josephlou5 / publicSheetFetch.ts
Last active November 25, 2025 05:57
Fetch data from a public Google Sheet using the Graph Visualization Query Language
/**
* @fileoverview
* Fetches data from a public Google Sheets using the Graph Visualization Query
* Language.
*
* See: https://developers.google.com/chart/interactive/docs/querylanguage
*
* Hint: Run with: `npx tsx publicSheetFetch.ts`
*
* =============================================================================
@josephlou5
josephlou5 / run_codepost_tests.py
Created March 8, 2023 05:11
Runs the codePost tests for the given assignments or submissions
"""
Runs the codePost tests for the given assignments.
The requests in this script come from looking at the network calls on
the codePost webpage. As such, they are not part of any agreed-upon API,
and are subject to change at any time. Use at your own risk.
This script uses the `asyncio` module to make requests for each
assignment in parallel. This means that to run the tests for all the
assignments will only take as long as the slowest assignment. However,
@josephlou5
josephlou5 / get_file_history.py
Last active December 1, 2022 02:23
Gets the history of a specific file in all the commits of a repository
"""
get_file_history.py
Gets the history of a specific file in all the commits of a repo.
GitPython: https://gitpython.readthedocs.io/en/stable/index.html
"""
# ==============================================================================
import json