This file contains hidden or 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
def sum_tree(w, h): | |
summ = 0 | |
for i in range(0, h + 1): | |
print(f"{summ} + {w**i}") | |
summ += w**i | |
return summ | |
def formula_tree(w, h): | |
return (w**(h + 1) - 1) // (w - 1) |
This file contains hidden or 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
vstupy = {} | |
vstupy["User"] = ["id", "email", "password", "name", "surname", "aid", "phone"] | |
vstupy["Courier"] = ["id", "email", "password", "name", "surname", "aid", "phone", "nin", "iban"] | |
vstupy["Restaurant"] = ["id", "email", "password", "name", "description", "logo", "opening_hours", "aid", "phone", "iban"] | |
vstupy["Address"]= ["id", "street", "city", "country", "postal_code"] | |
vstupy["Position"]= ["id", "oid", "latitude", "longtitude", "time"] | |
vstupy["Menu"]= ["id", "rid", "mid", "name", "price", "picture"] | |
vstupy["Order"] = ["id", "uid", "cid", "rid", "state", "created", "price", "courier_rating", "restaurant_rating"] | |
vstupy["OrderItem"]= ["id", "oid", "mid", "amount"] |
This file contains hidden or 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
template<typename T> | |
void mergeArrays(T arr1[], T arr2[], int n1, | |
int n2, T arr3[]) | |
{ | |
int i = 0, j = 0, k = 0; | |
// Traverse both array | |
while (i<n1 && j <n2) | |
{ | |
if (arr1[i] < arr2[j]) |
This file contains hidden or 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
#Kopirajt LBLZR_ lmao | |
import os.path, codecs, sys | |
date_files = ["dates1.txt", "dates2.txt", "dates3.txt", "dates4.txt"] | |
output_file = "dates_out.txt" | |
def save_list(listt, filename): | |
with codecs.open(filename, "w", "utf-8") as fp: | |
#firstly we delete old entries | |
fp.truncate() |
This file contains hidden or 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
#ifndef __PROGTEST__ | |
#include <cstdio> | |
#include <cstdlib> | |
#include <cctype> | |
#include <cstring> | |
#include <iostream> | |
#include <iomanip> | |
#include <fstream> | |
#include <sstream> | |
#include <vector> |
This file contains hidden or 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
#ifndef __PROGTEST__ | |
#define pause() system("pause"); | |
#else | |
#define pause(); | |
#endif | |
#include <iostream> | |
int main() { | |
std::cout << "test" << std::endl; |
This file contains hidden or 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
//Copyright LBLZR_ | |
#include <iostream> | |
#include <vector> | |
const std::pair<int, int> POSSIBLE_MOVES[] = { {2, -1}, {2, 1}, {1, 2}, {-1, 2}, {-2, 1}, {-2, -1}, {-1, -2}, {1, -2} }; | |
const unsigned int POSSIBLE_MOVES_AMOUNT = sizeof(POSSIBLE_MOVES) / sizeof(POSSIBLE_MOVES[0]); | |
template <size_t rows, size_t cols> | |
void copyArray(bool(&in)[rows][cols], bool(&out)[rows][cols]) { | |
for (unsigned int x = 0; x < rows; x++) |
This file contains hidden or 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
#include <iostream> | |
#include <thread> | |
#include <vector> | |
struct Node { | |
bool WalkedRight; | |
bool WalkedDown; | |
Node() { | |
WalkedRight = false; |
This file contains hidden or 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
#include <string> | |
#include <iostream> | |
#include <fstream> | |
#include <vector> | |
#include <SFML/Graphics.hpp> | |
#include <SFML/Audio.hpp> | |
int main() | |
{ | |
std::vector<std::string> wordlist; |
This file contains hidden or 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
# Pls no stealerino licence | |
import discord, asyncio, os, random | |
IMG_FOLDER = "dogs" | |
BOT_TOKEN = "SECRET" | |
IMG_MESSAGE = ":dog: :dog: :dog:" | |
client = discord.Client() | |
if not os.path.isdir(IMG_FOLDER + "/"): |
NewerOlder