Skip to content

Instantly share code, notes, and snippets.

Avatar

M.J. theelous3

  • Dublin, Ireland
View GitHub Profile
View in_order.py
import asyncio
from random import randint
from httpx import AsyncClient
async_client = AsyncClient()
async def handler(handler_id):
6452 ** randint(1, 10)
print(handler_id, 1)
View gist:d3ac9f95bacd8312cf9d39713d9e0e0c
Erin Sylis > Hello!
Erin Sylis > Are you interested in a session? Or just curious?
Kurgill > A session
Kurgill > I will pay you double your hours rate, 30 mins in to the session. Your topic is the sexualisation of processed meats. I will masturbate for the entire session, and eat dry crackers.
(We then debate pricing, and I offer 10m per 10 mins which he accepts, though I tipped too.)
View x.cpp
// lol sup
#include <AccelStepper.h>
#include <AccelStepper.h>
// STEPPER INIT
AccelStepper quill_stepper(AccelStepper::DRIVER, 2, 3);
const int max_speed = 4000;
View lol.py
sum([(lambda x: x ** x)(i) for i in takewhile(lambda x: x != -1, (int(input("give thing")) for _ in repeat("lol fuk u python")))])
View words.json
{
"five_w":[
"flyer",
"gored",
"dandy",
"idiot",
"suing",
"hales",
"yowed",
"hands",
View words_gen.py
import json
from random import sample
_ALL_WORDS = []
with open("words.json", 'r') as word_file:
word_dict = json.load(word_file)
for key, word_list in word_dict.items():
_ALL_WORDS.extend(word_list)
View base60.py
>>> from collections import deque
>>>
>>> def ldp(n, current=60):
... # largest_divisible_power
... s = 1
... while n > current:
... current = current ** s
... s += 1
... return s - 2
...
View x.multipart
'--8banana133744910kmmr13a56!102!2405\r\nContent-Disposition: form-data; name="file_1"; filename="test_file1.txt"; Content-Type: application/octet-stream\r\n\r\nCompooper\r\n--8banana133744910kmmr13a56!102!2405--\r\n'
View last_loop_cacher.py
class LastLoopCacherNoFinal:
pass
class LastLoopCacher:
"""
An iterable context manager that stores the last value it loops as
an attribute, `final`.
Final falls out of scope upon exiting the context manager.
View race_condition_protector.py
from threading import BoundedSemaphore
from types import GeneratorType
from collections.abc import MappingView, Sequence
from functools import partial
_ALLOWED_SEQUENCE_TYPES = (
Sequence,
MappingView,
GeneratorType