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 "liscpp.h" | |
using namespace std; | |
int main() | |
{ | |
ReadEvalPrint( | |
(Let, | |
tok(fold), (Lambda, tok(F), tok(I), tok(L), |
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
#![feature(slice_split_once)] | |
use std::{ | |
cmp::{max, min}, | |
collections::hash_map::Entry, | |
env::args_os, | |
fs::File, | |
io::{stdout, Write as _}, | |
path::Path, | |
}; |
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
use nom::{ | |
branch::alt, | |
character::complete::{alpha1, char, digit1, multispace1}, | |
combinator::eof, | |
IResult, Parser, | |
}; | |
use nom_supreme::{error::ErrorTree, multi::collect_separated_terminated, ParserExt}; | |
#[derive(Debug, Clone)] | |
struct Structure<'a> { |
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
from tkinter import * | |
import asyncio | |
from functools import wraps | |
import websockets | |
def runloop(func): | |
''' | |
This decorator converts a coroutine into a function which, when called, | |
runs the underlying coroutine to completion in the asyncio event loop. | |
''' |
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
// ==UserScript== | |
// @name No Trending | |
// @version 0.1 | |
// @description Turn off twitter trending | |
// @author You | |
// @match https://twitter.com/* | |
// @icon https://www.google.com/s2/favicons?domain=twitter.com | |
// @require https://raw.githubusercontent.com/muicss/sentineljs/master/dist/sentinel.min.js | |
// @grant none | |
// ==/UserScript== |
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
use std::{ | |
marker::PhantomData, | |
mem::MaybeUninit, | |
ops::Deref, | |
process::abort, | |
ptr::NonNull, | |
sync::atomic::{AtomicU32, Ordering}, | |
}; | |
const MAX_REFCOUNT: u32 = i32::MAX as u32; |
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
pub mod sort; | |
use serde::de; | |
#[derive(Debug, Clone, Copy)] | |
pub struct DepthLimiter<T> { | |
depth: usize, | |
inner: T, | |
} |
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
[ | |
{ | |
"title": "Nathan's", | |
"data": { | |
"BASE_PLANET_MOD": 1, | |
"RESOURCES_MULTIPLIER": 3, | |
"INFLUENCE_MULTIPLIER": 2, | |
"TECH_MOD": 5, | |
"TECH_PROPULSION_MOD": 0, | |
"TECH_WARFARE_MOD": 0, |
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
from contextlib import contextmanager | |
class SwitchError(RuntimeError): | |
pass | |
@contextmanager | |
def switch(switch_value, *, ignore_nomatch=True): | |
blocks = {} | |
blocks.default = None |
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
use rmp_serde::Raw; | |
use serde::{ser, Serialize}; | |
use thiserror::Error; | |
/// Serializer that serializes strings as a list of char | |
struct CharListSerializer { | |
output: Vec<char>, | |
} | |
#[derive(Debug, Error)] |
NewerOlder