This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
// SRC: https://klimapoint.pl/kalkulator-wilgotnosci-bezwzglednej/ z htmla po prostu | |
// temp - temperatura w °C (-20 - 50) | |
// rh - wilgotność względna w % (1 - 100) | |
function getDP(temp, rh) { | |
var h = ((Math.log10(rh)-2)/0.4343) + ((17.62*temp)/(243.12+temp)); | |
h = ((243.12*h)/(17.62-h)); | |
return Math.round(h*100)/100; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
s() { g++ -O2 $1.cpp; for e in $([ -z "$2" ] && echo ./$1/data/sample/*.ans || echo ./$1/data/*/*.ans); do f=${e%.*}; echo $f.in; diff -wyBIEZ $f.ans <(./a.out < $f.in); done }; s bob; # s bob 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% src: https://www.youtube.com/watch?v=fCzF5gDy60g | |
1) | |
\documentclass{article} % albo beamer | |
\usepackage[margin=1.25in]{geometry} | |
\usepackage{amsmath, amssymb} % do jakiejkolwiek matmy | |
\usepackage{graphicx} % do wstawiania obrazków | |
\begin{document} | |
\begin{center} \end{center} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from random import shuffle, randint | |
from PIL import Image | |
def generate_maze(X, Y): | |
''' | |
Generate a maze and return its walls | |
Return type (x_walls, y_walls) | |
x_walls/y_walls - bool array, True = wall, False = no wall | |
x_walls/y_walls ordered from left to right / top to bottom | |
''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openssl genrsa $((1024*16)) | openssl rsa -text | |
python3 -c "import re;print(int(''.join(re.split('[:\s ]', open(0).read())), 16))" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import random | |
import shutil | |
import math | |
N = 100 | |
bag, weights = [], [] | |
W = shutil.get_terminal_size((80, 20))[0] | |
class BreakException(Exception): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function confirm() { | |
# https://stackoverflow.com/a/1885534/6732111 | |
read -p "Is it ok? " -n 1 -r | |
echo # (optional) move to a new line | |
if [[ ! $REPLY =~ ^[Yy]$ ]] | |
then | |
[[ "$0" = "$BASH_SOURCE" ]] && exit 1 || return 1 # handle exits from shell or function but don't exit interactive shell | |
fi | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# Copyright 2021 Marcin Zepp <nircek-2103@protonmail.com> | |
# SPDX-License-Identifier: MIT | |
import sys | |
import subprocess | |
import re | |
import math | |
opus, oldmagic, quiet, magic = False, False, True, True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SuperBackup -- wyizolowany.zip/New Text Document.txt:$zip2$*0*3*0*9d8b65bd625853b3cdd279cdba545f97*3546*3e8*6834b1c27b44ddde6d3dbff7c736cfb0b6fe4c5fca6fe5238ff214b7e15c81d313375404950301a0f355cb86177ce40579fb38fd5e28291e8c1a50ddb31c8a37d13353d25b0e17728c58d730fea55d4f2f7cba3acc2e439c88f7924193e19d4b2455e2ef8bc171e28c2eb259a2f9b583c439e449af1b3a514ac0b9e93e522afb5ac2430128ce94f28eadb4e54e1b74d44d1cc8da47e57f615a0b9b2ccf061805bcc54c40a1b8b79a0b2b38896c972ff619c2a76d2ee785bb7555da6ab3b9b1ab089591e86b7c6f0ca693a1b7e549d388a63242576606bd5271e065f966e84a371b1a7c9d6b0e007affa668900196f4b39c24f0932ca551b6fb5de07e625d90a1ad930d4cb49844e0f918d497ae9dc8db4b2b9d02abf1ba7a36400efd499590b85a5d8f16def72f0d1c4b49953df839dfa6587f5559ee7a862d53759932fe4006f480fa0540ff06192a38ffe083cb585a3c2f86f56eb66958b460055eb1a86f46700d4bf5e3ff89002922345a75f14e2859799d8746b7d5378c9a9be7c10c74ca78153162275a3c0dd0b31bc95bba36670360f86aee075bc0b9a630faad4bef64c88f397ffbbe3fb92c041df20156aef44b0179768fa7e6adec3cd575e144f604f7715a163f15d766eeb2 |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.