Skip to content

Instantly share code, notes, and snippets.

View Yourun-proger's full-sized avatar
🥛
kefir

Yourun Yourun-proger

🥛
kefir
View GitHub Profile
View code.py
def add(x=None):
if x is None:
return getattr(add, 'result', 0)
else:
if hasattr(add, 'result'):
add.result += x
else:
setattr(add, 'result', x)
return add
@Yourun-proger
Yourun-proger / cached_client.py
Created May 9, 2022 12:27
One of @Tishka17 tasks. Maybe it's wrong
View cached_client.py
import time
from dataclasses import dataclass
from typing import List
@dataclass
class Item:
id: int
name: str
View OOP_GO.go
package main
import "fmt"
//-------------------- ABSTRACT INTERFACES --------------------
type WaterAbsorber interface {
Pour(num int)
TotalLiquid() int
}