Skip to content

Instantly share code, notes, and snippets.

@mypy-play
mypy-play / main.py
Created Dec 22, 2021
Shared via mypy Playground
View main.py
from typing import Iterator
def fib(n: int) -> Iterator[int]:
a, b = 0, 1
while a < n:
yield a
a, b = b, a + b
@Luca9922
Luca9922 / submit.cfg
Created Dec 22, 2021
TuD Uebung 9, submit 1640183672
View submit.cfg
[Uebung]
aufgabe = 9
[Abgeben]
datei1 = uebung09.py
[submit]
encrypt = True
time = 1640183672
View wp-next-post-queries.ts
export type Post = {
id: string;
author: { node: Author };
date: string;
content: string;
slug: string;
title: string;
categories: { edges: { node: Term }[] };
tags: { edges: { node: Term }[] };
};
@mihll
mihll / test_file.txt
Created Dec 22, 2021
A brand new gist
View wp-next-page-component.tsx
import parseHTML from "html-react-parser";
const Page = (page: PageProps) => (
<>
<Head>
<title>{page.title}</title>
</Head>
<article>
<header className={styles.header}>
@choco-bot
choco-bot / FilesSnapshot.xml
Created Dec 22, 2021
speedtest v1.1.1 - Passed - Package Tests Results
View FilesSnapshot.xml
<?xml version="1.0" encoding="utf-8"?>
<fileSnapshot xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<files>
<file path="C:\ProgramData\chocolatey\lib\speedtest\ookla-speedtest-1.1.1-win64.zip.txt" checksum="CBEE07B621A6CD574ED9450576754B06" />
<file path="C:\ProgramData\chocolatey\lib\speedtest\README.md" checksum="547DA9413096C5F8D74858D4846D048F" />
<file path="C:\ProgramData\chocolatey\lib\speedtest\speedtest.nupkg" checksum="D7462222DAA01D86B1B067FFCB513000" />
<file path="C:\ProgramData\chocolatey\lib\speedtest\speedtest.nuspec" checksum="0D519A3AB6DCC1F799C45072F8720038" />
<file path="C:\ProgramData\chocolatey\lib\speedtest\tools\chocolateyInstall.ps1" checksum="9704932717E1B4E518C91E4D6165DEE7" />
<file path="C:\ProgramData\chocolatey\lib\speedtest\tools\speedtest.exe" checksum="90E29C4098418F00A7E45202BE3BEDD6" />
<file path="C:\ProgramData\chocolatey\lib\speedtest\tools\speedtest.md" checksum="45862B699BA674518533EC71
@StarkGang
StarkGang / licence_header_adder.py
Created Dec 22, 2021
Use this script to add licence header to your python files.
View licence_header_adder.py
import asyncio
import pathlib
import os
import time
import multiprocessing
from functools import wraps
from concurrent.futures.thread import ThreadPoolExecutor
executor = ThreadPoolExecutor(max_workers=multiprocessing.cpu_count() * 5)
@OmriSteiner
OmriSteiner / keras_load_model_bug.ipynb
Last active Dec 22, 2021
Keras fails to load a SavedModel which contains __eq__/__ne__
View keras_load_model_bug.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@max-lt
max-lt / telegram-bot.js
Created Dec 22, 2021
Basic telegram bot
View telegram-bot.js
addEventListener("fetch", (event) => {
event.respondWith(
handleRequest(event.request).catch(
(err) => new Response(err.stack, { status: 500 })
)
);
})
function sendMessage(chat_id, text) {
return fetch(`https://api.telegram.org/bot${BOT_TOKEN}/sendMessage`, {