Skip to content

Instantly share code, notes, and snippets.

View ansipunk's full-sized avatar
🎯
Focusing

ansipunk

🎯
Focusing
View GitHub Profile
@ansipunk
ansipunk / doomsday_fuel.py
Last active August 6, 2023 20:21
Doomsday Fuel solution
# OUTDATED:
# Head to https://gist.github.com/dcondrey/a078db324ea085843153582b9ffa253c
# for a revisited version which handles some special edge cases.
import copy
import fractions
def number_of_transients(matrix):
"""Get number of transients states.
// ==UserScript==
// @name Wipe threads on 2ch.hk
// @namespace https://2ch.hk/
// @version 0.4.1
// @description Wipes threads. Duh.
// @match https://2ch.hk/*
// ==/UserScript==
const wipeText = 'W'.repeat(12000);
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: 'stable',
@ansipunk
ansipunk / event_loop_soup.py
Created February 28, 2021 10:28
Event loop soup
import asyncio
import random
async def crumble(number: int) -> None:
print(f'Крошим залупу {number}...')
await asyncio.sleep(random.random())
print(f'Залупа {number} покрошена.')