- for the dough:
- 1¼ cup (300 mL) milk or almond milk
- ⅓ cup (75 g) butter or margarine
- 2 teaspoons (1 packet, or 6 g) yeast
- ½ cup (100 mL) sugar
- 4 ¼ cups flour
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "Arduino.h" | |
#define KEY_UP 1 | |
#define KEY_DN 0 | |
/* Connect the Arduino to the socket of the keyboard's main microcontroller | |
(an AT89S8253: http://ww1.microchip.com/downloads/en/DeviceDoc/doc3286.pdf) | |
with the following pins: | |
Kinesis U1 Arduino |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const f = { | |
m() { | |
return this.n(); | |
}, | |
n() { | |
return "hi!"; | |
} | |
}; | |
f.m(); // "hi!" | |
f.n(); // "hi!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
import pytest | |
class Mutable: | |
def __init__(self) -> None: | |
self._mutations: int = 0 | |
@property |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# look, it's art. okay? it's art about how functional programming in Python is sometimes ugly | |
# | |
# it just so happens this art has a terrible worst-case complexity. | |
# | |
# usage: echo "1 2 3" | python countdown.py | |
from itertools import chain, izip_longest, product, permutations | |
import operator | |
import sys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
from urllib.parse import urljoin | |
from aiohttp.client import request | |
async def main(): | |
for endpoint in ["/success_without_reason", "/failure_without_reason"]: | |
async with request("get", urljoin("http://0.0.0.0:8080", | |
endpoint)) as resp: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
const formatDuration = ({hours, minutes, seconds}) => { | |
const finalSeconds = seconds % 60; | |
const finalMinutes = ((minutes || 0) + Math.floor(seconds / 60)) % 60; | |
const finalHours = Math.floor((minutes || 0) / 60 + seconds / 3600) + (hours || 0); | |
const formattedHours = (finalHours && finalHours > 0) ? `${finalHours}h` : ''; | |
const formattedMinutes = (finalMinutes && finalMinutes > 0) ? `${finalMinutes}m` : ''; | |
const formattedSeconds = (finalSeconds && finalSeconds > 0) ? `${finalSeconds}s` : ''; | |
return `${formattedHours}${formattedMinutes}${formattedSeconds}`; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set editing-mode vi | |
set keymap vi | |
set convert-meta on |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# invoke with, ex., 'echo "10010 10110" | sed -rf adder.sed' | |
:add | |
p | |
# If we have two final zeroes: | |
/^[01]*0\s[01]*0$/ { | |
# drop the final zeroes | |
s/^([01]*)0(\s)([01]*)0$/\1\2\3/ | |
# swap the hold buffer in | |
x | |
# add a 0 at the front |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder