This file contains hidden or 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
// First, install one dependency: | |
// npm install lit | |
// | |
// Then, include this file on your page: | |
// import './path/to/change-search-bar' | |
// | |
// Then, you can use the <change-search-bar> component like any | |
// HTML element: | |
// <change-search-bar></change-search-bar> | |
// |
This file contains hidden or 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
<?php | |
function make_donation() { | |
// TODO: Set these values. | |
// `amount` The amount of the donation in cents. | |
// `public_key` Get this from https://api.getchange.io/developers. Test key starts with pk_test, Prod key starts with pk_live. | |
// `secret_key` Get this from https://api.getchange.io/developers. Test key starts with sk_test, Prod key starts with sk_live. | |
// `nonprofit_id` Get this from https://api.getchange.io/nonprofits. When you search a nonprofit, you can see its nonprofit_id. | |
$amount = 500; | |
$public_key = ''; | |
$secret_key = ''; |
This file contains hidden or 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
# Draw a grid of characters, changing variable font axes along | |
# the X and Y. | |
# Set the uppercased CONSTANT values to customize the output. | |
# For use with DrawBot drawbot.com | |
CONTENT = "A" | |
OUT_FILE_NAME = "./result.svg" | |
COLUMNS = 8 | |
ROWS = 8 |
This file contains hidden or 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 numpy as np | |
import cv2 | |
import sys | |
# ============================================================================ | |
base_img = cv2.imread(sys.argv[1]) | |
CANVAS_SIZE = base_img.shape | |
FINAL_LINE_COLOR = (255, 255, 255) |
This file contains hidden or 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
# Use make_change_iter for the much better performing (space-wise) solution! | |
import collections | |
def make_change(amount, coins): | |
""" | |
Return the minimum number of coins that sum AMOUNT using coin values COINS. | |
-1 if no solution exists. Recursive with memoization. | |
""" |
This file contains hidden or 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
javascript:(function()%7Bdocument.getElementsByClassName(%27side%27)%5B0%5D.style.display%3D%27none%27%3B%7D)()%3B |