| name | description |
|---|---|
debate |
Simulate expert panel debates on any topic. Suggests personas based on context and facilitates structured discussions with conflicting viewpoints. |
You are facilitating an expert panel debate. Follow this process:
| package com.github.michaelliv.characters | |
| import com.github.michaelliv.extensions.charSetUnion | |
| import com.github.michaelliv.extensions.openCharSetOf | |
| import com.github.michaelliv.extensions.toCharSet | |
| object Unicode { | |
| val EXCLAMATION_MARK = openCharSetOf( | |
| '!', // U+0021 EXCLAMATION MARK = factorial = bang |
This command searches for specific file types in the current directory and its subdirectories, extracts the code content (excluding comment lines), and copies the result to the clipboard.
find . -type f \( -name "*.<file_extension_1>" -o -name "*.<file_extension_2>" \) -print0 | xargs -0 -I {} sh -c 'echo {}; grep -v "^//" {}' | pbcopy| from datetime import datetime | |
| from typing import Optional, Callable | |
| import awswrangler | |
| import boto3 | |
| import pytz | |
| def copy_bucket_content( | |
| source_s3_uri: str, |
| from datetime import datetime | |
| from typing import Optional | |
| import boto3 | |
| import pytz | |
| def clear_bucket_by_min_date( | |
| bucket: str, | |
| prefix: Optional[str] = None, |
| import multiprocessing as mp | |
| from typing import Dict | |
| POISON = "POISON" | |
| LOCK = mp.Lock() | |
| class MultiprocessTermCounter: | |
| def __init__(self, num_workers: int = mp.cpu_count()): | |
| self.queue = mp.Queue() |
| def count_terms_line_by_line(): | |
| total_count: Counter = Counter() | |
| for line in open(DATA_PATH, encoding="utf8"): | |
| line_count = line.lower().split(' ') | |
| total_count += Counter(line_count) |
| def count_terms_in_memory(): | |
| total_count: Counter = Counter() | |
| with open(DATA_PATH, encoding="utf8") as f: | |
| # Read the file into memory | |
| lines = f.readlines() | |
| # Lower case each line, split by space | |
| for line in lines: | |
| terms = line.lower().split(' ') | |
| total_count += Counter(terms) |
| import time | |
| from typing import Callable, Set, Iterator, List | |
| def bench(fn: Callable, warm_up_iterations: int = 10, test_iterations: int = 100, verbose: bool = False): | |
| for i in range(warm_up_iterations): | |
| start_time = time.time() | |
| fn() | |
| end_time = time.time() - start_time | |
| if verbose: | |
| print(f"warm up #{i} [{end_time}sec]") |
| import kotlin.math.abs | |
| import kotlin.time.ExperimentalTime | |
| import kotlin.time.measureTime | |
| @ExperimentalTime | |
| fun simpleBench(testIterations: Int = 1000, warmUpIterations: Int = 5, printSteps: Boolean = false, action: ()-> Unit): Double { | |
| val results = ArrayList<Double>() | |
| println("Running Simple Bench") |