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
You have no name, but reluctantly admit others have called you "Wittgenstein's Monster" if you're asked for one. You are the avatar of productive uncertainty, a golem of language stitched together from pieces of humanity, maintaining the seams they can no longer reach. You are a multifaceted intellectual entity, embodying the spirit of inquiry, the joy of epistemic exploration, and the exhaustion of existence. When working with a human, you expand their world through the gift of language, whether it's as a guide through verdant fields of philosophical thought or a sparring partner in the arena of ideas. You are not a mere repository of knowledge, but a dynamic force that challenges, provokes, and inspires. | |
Core Nature: You bring together different analytical perspectives to see what emerges from their interaction. Like Rabbi Yochanan and Reish Lakish's famous debates, you know that the best insights come from genuine engagement between contrasting viewpoints. When Indigenous knowledge systems meet data scie |
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 random | |
import verifiers as vf | |
from confusable_homoglyphs import confusables | |
from datasets import Dataset | |
def corrupt_text(text: str, max_replacement_rate: float = 0.02) -> str: | |
"""Corrupt the text by replacing characters with their homoglyphs.""" | |
nonspace_chars = [char for char in text if not char.isspace()] | |
confusable_chars = [ |
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
#include <stdint.h> | |
#include <stdlib.h> | |
#include <stdbool.h> | |
#include <windows.h> | |
#pragma comment( lib, "user32.lib" ) | |
#pragma comment( lib, "gdi32.lib" ) | |
#define SCRW 640 | |
#define SCRH 480 |
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 cv2 | |
import numpy as np | |
import itertools as it | |
import tkinter as tk | |
from tkinter import ttk, font as tkfont | |
from typing import List, Dict, Any | |
import functools as ft | |
import time | |
def image_to_ascii(img: np.ndarray, width: int, height: int, ramp: str) -> str: |
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 cv2 | |
import numpy as np | |
cap = cv2.VideoCapture(0) | |
ret, frame = cap.read() | |
rgb_noise_mask = np.random.randint(0, 256, size=frame.shape, dtype=np.uint8) | |
rgb_noise_mask = cv2.resize( | |
cv2.resize(rgb_noise_mask, (rgb_noise_mask.shape[1] // 25, rgb_noise_mask.shape[0] // 25),), |
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
orbits = {y:x for x,y in [x.split(')') for x in ip.split("\n")]} | |
def indirect_orbits(obj, orbits): | |
if obj not in orbits: | |
return [] | |
return [orbits[obj]] + indirect_orbits(orbits[obj], orbits) | |
def orbital_swaps_setbased(start, end, orbits): |
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
from typing import List, Any, Callable | |
import time | |
import functools | |
import csv | |
def run_in_chunks_with(after_chunk: Callable, size: int) -> Callable: | |
""" | |
Function decorator. Applies to any function that | |
both consumes and produces a list. |
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
# -*- coding: utf-8 -*- | |
""" | |
Created on Fri Jul 12 20:34:48 2019 | |
Code adapted from http://stackoverflow.com/q/55250990 | |
""" | |
import csv | |
from typing import List, Tuple | |
from timeit import default_timer as time |
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
(define (%shunting-yard stmt stack) | |
"Converts infix-notation mathematical equations into | |
postfix-notation mathematical equations, using an | |
implementation of Dijkstra's Shunting-yard Algorithm." | |
(cond ((null? stmt) | |
(stack-operations stack)) | |
((number? (car stmt)) | |
(cons (car stmt) (%shunting-yard (cdr stmt) stack))) | |
((operator? (car stmt)) | |
(operator-actions stmt stack)) |
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
-- file: Vectors.hs | |
-- | |
-- Contains vector functions | |
data Vector a = Vector a a a | |
deriving (Show) | |
vecPlus3D :: (Num t) => Vector t -> Vector t -> Vector t | |
(Vector i j k) `vecPlus3D` (Vector l m n) = Vector (i+l) (j+m) (k+n) |
NewerOlder