Skip to content

Instantly share code, notes, and snippets.

View imgVOID's full-sized avatar
🎯
Focusing

Maria Hl. imgVOID

🎯
Focusing
View GitHub Profile
import React, {useState, useEffect} from 'react';
function Example() {
const [count, setCount] = useState(0);
useEffect(() => {
document.title = `Нажато ${count} раз`;
});
}
@imgVOID
imgVOID / padd.py
Last active October 3, 2021 13:33 — forked from dpoulopoulos/padd.py
import ctypes
import pathlib
if __name__ == "__main__":
# загрузка библиотеки
libname = pathlib.Path().absolute() / "libcadd.so"
c_lib = ctypes.CDLL(libname)
x, y = 6, 2.3
@imgVOID
imgVOID / plural.py
Created January 20, 2022 15:20 — forked from CubexX/plural.py
Python plural russian days / Склонение день/дня/дней
def plural_days(n):
days = ['день', 'дня', 'дней']
if n % 10 == 1 and n % 100 != 11:
p = 0
elif 2 <= n % 10 <= 4 and (n % 100 < 10 or n % 100 >= 20):
p = 1
else:
p = 2