Skip to content

Instantly share code, notes, and snippets.

@foarsitter
foarsitter / producer_consumer.py
Last active January 22, 2024 15:28 — forked from showa-yojyo/producer_consumer.py
Implement Producer/Consumer pattern with asyncio.Queue
"""
DRY approach of https://gist.github.com/showa-yojyo/4ed200d4c41f496a45a7af2612912df3
"""
import asyncio
import random
from collections.abc import Callable
async def producer(n):
@foarsitter
foarsitter / example.html
Created July 11, 2022 12:26
Example of @calumk/editorjs-columns with the inlineToolbar set to True
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Editor.js example</title>
<link href="https://fonts.googleapis.com/css?family=PT+Mono" rel="stylesheet">
<link href="assets/demo.css" rel="stylesheet">
<script src="assets/json-preview.js"></script>
<script src="example_data.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />