Skip to content

Instantly share code, notes, and snippets.

View willienillie's full-sized avatar
🤔
💭 🤔

Willie Miller willienillie

🤔
💭 🤔
View GitHub Profile
@willienillie
willienillie / magic_mock_cheat_sheet.py
Last active April 15, 2024 18:13
Python MagicMock Mocking Cheatsheet
# needed imports
from mock import MagicMock, call
if __name__ == "__main__":
# create magic mock
mocker = MagicMock()
# make a single call
mocker("foo")
# check if method was called
@willienillie
willienillie / gettysburg-address.txt
Created March 9, 2021 19:37
gettysburg-address.txt
Four score and seven years ago our fathers brought forth on this continent, a new nation, conceived in Liberty, and dedicated
to the proposition that all men are created equal.
Now we are engaged in a great civil war, testing whether that nation, or any nation so conceived and so dedicated, can long
endure. We are met on a great battle-field of that war. We have come to dedicate a portion of that field, as a final resting
place for those who here gave their lives that that nation might live. It is altogether fitting and proper that we should
do this.
But, in a larger sense, we can not dedicate—we can not consecrate—we can not hallow—this ground. The brave men, living
and dead, who struggled here, have consecrated it, far above our poor power to add or detract. The world will little note,
@willienillie
willienillie / declaration-of-independence.txt
Created March 9, 2021 19:37
declaration-of-independence.txt
When in the Course of human events it becomes necessary for one people to dissolve the political bands which have connected
them with another and to assume among the powers of the earth, the separate and equal station to which the Laws of Nature
and of Nature's God entitle them, a decent respect to the opinions of mankind requires that they should declare the causes
which impel them to the separation.
We hold these truths to be self-evident, that all men are created equal, that they are endowed by their Creator with certain
unalienable Rights, that among these are Life, Liberty and the pursuit of Happiness. — That to secure these rights, Governments
are instituted among Men, deriving their just powers from the consent of the governed, — That whenever any Form of Government
becomes destructive of these ends, it is the Right of the People to alter or to abolish it, and to institute new Government,
laying its foundation on such principles and organizing its powers in such form, as to them shall seem most likely
@willienillie
willienillie / claim_history_view_example.json
Last active August 17, 2021 15:22
Claim History View Example Json
{
"type": "claimHistory",
"id": "12345",
"image": {
"type": "DOWNLOAD",
"url": "https://path/to/woman/on/coins.png"
},
"rows": [
{
"type": "text",