Text with code
Hidden text
from tqdm import tqdm | |
import os | |
import requests | |
import pprint | |
import hashlib | |
import base64 | |
# for xml parsing | |
import xml.etree.ElementTree as ET |
code
Hidden text
// template function to print table | |
template <typename T> | |
void ptable(vector<vector<T>> table, int axis_offset = 0, int split = 10, | |
int tab_size = 8, int index_width = 3, bool round_val = false) { | |
int rows = table.size(); | |
int splitted_parts = rows / split + (rows % split != 0); | |
for (int table_n = 0; table_n < splitted_parts; table_n++) { | |
int columns = min(split, (int)rows - table_n * split); | |
cout << setw(index_width + 3) << " | "; | |
for (int i = 0; i < columns; i++) { |
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "build file", | |
"type": "cppdbg", | |
"request": "launch", | |
"program": "${workspaceFolder}/compile/${fileBasenameNoExtension}", | |
"args": [], | |
"stopAtEntry": false, |
#include <iostream> | |
#include <vector> | |
#include <cstdlib> | |
namespace 🔵 = std; | |
using 🔢 = int; | |
using 💯 = unsigned; | |
using 💀 = void; | |
using 🕖 = time_t; | |
using 👌 = bool; |
def commentify(text, start, end, width=32, fill="="): | |
content = f' {text} '.center(width - len(start) - len(end) - 2, fill) | |
return f'{start} {content} {end}' | |
while True: | |
text = input('Enter text: ') | |
if not text: | |
break | |
print(commentify(text.upper(), '//', '//', width=42)) |
<!-- The button to open modal --> | |
<label for="my-modal" class="btn modal-button">open modal</label> | |
<input type="checkbox" id="my-modal" class="modal-toggle" /> | |
<label for="my-modal" class="modal modal-bottom sm:modal-middle"> | |
<label class="modal-box"> | |
<h3 class="font-bold text-lg">Congratulations random Internet user!</h3> | |
<p class="py-4">You've been selected for a chance to get one year of subscription to use Wikipedia for free!</p> | |
<div class="modal-action"> | |
<label for="my-modal" class="btn">Yay!</label> |
<h1>Masonry - stagger option, vanilla JS</h1> | |
<p>Resize window or click to toggle item size</p> | |
<div class="grid"> | |
<div class="grid-item"></div> | |
<div class="grid-item grid-item--width2 grid-item--height2"></div> | |
<div class="grid-item grid-item--height3"></div> | |
<div class="grid-item grid-item--height2"></div> | |
<div class="grid-item grid-item--width3"></div> |
# вычисляет хэш нескольких файлов | |
from hashlib import md5 | |
def files_hash(files): | |
temp = md5() | |
for file in tqdm(files, desc="calculating files hash"): | |
with open(file, "rb") as f: | |
for chunk in iter(lambda: f.read(4096), b""): | |
temp.update(chunk) | |
return temp.hexdigest() |
#include <stdio.h> | |
#define _USE_MATH_DEFINES | |
#include <math.h> | |
#include <windows.h> | |
// width and height of screen | |
#define ww 100 | |
#define wh 50 | |
void clr(CHAR_INFO* d) |