Skip to content

Instantly share code, notes, and snippets.

View jerrymj's full-sized avatar

Jerry Mathen Jacob jerrymj

View GitHub Profile
@RuolinZheng08
RuolinZheng08 / backtracking_template.py
Last active November 2, 2025 23:57
[Algo] Backtracking Template & N-Queens Solution
def is_valid_state(state):
# check if it is a valid solution
return True
def get_candidates(state):
return []
def search(state, solutions):
if is_valid_state(state):
solutions.append(state.copy())
@Tynael
Tynael / README.md
Last active October 4, 2025 16:09
How to use npx to run gist based scripts
@seanickle
seanickle / AWS Athena timestamp select query .md
Last active September 4, 2023 00:51
AWS Athena timestamp select query

Doing a SELECT on a specific timestamp range

  • Here, the Athena table athena_table has the columns timestamp, day, month, year, id
select timestamp,month,day,year,id
from athena_table

WHERE month = 8 and day = 15
AND (CAST(timestamp as varchar) BETWEEN '2018-08-15 22:00:00' AND '2018-08-15 22:10:00')
 
@jiffle
jiffle / Spock Cheatsheet.md
Last active January 23, 2025 16:15
Spock Useful Patterns Cheatsheet

Spock Useful Patterns Cheatsheet

Adding sequences of behaviour to Mocks and Stubs

The >>> operator allows a sequence of values to be returned:

myMock.someCall() >>> ['first value', 'second value', 'third value', 'etc']

This returns each string in turn. Behaviour (such as throwing exceptions) in closures cannot be used by this operator.

The >> operator allows value or behaviour (closures) to be returned

@joyrexus
joyrexus / README.md
Last active April 19, 2025 09:46 — forked from btoone/curl.md
curl tutorial

An introduction to curl using GitHub's API.

Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin

Includes HTTP-Header information in the output