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
<?php | |
// Created by Maciej Kaszkowiak ([email protected]) | |
// Implemented according to https://wordpress.org/support/topic/multiple-languages-in-the-same-domain/ | |
// Modify PLL_Links_Sterowniki.hosts and PLL_Links_Sterowniki.protocols in order to set domains | |
// The remaining languages will redirect to directories, such as /en/ or /it/ | |
/** | |
* Links model for use when the language code is added in url as a directory | |
* for example mysite.com/en/something |
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 czy_k_podobne(n, A, B, k): | |
if cmp(A, B, n) and k==0: | |
return True | |
# indeksy sa zmniejszone o 1 w porownaniu do zadania | |
# ze wzgledu na 0-indexing (w zad. jest 1-indexing) | |
if (cmp(slice(A, 0, k-1), slice(B, n-k, n-1), k) | |
and cmp(slice(A, k, n-1), slice(B, 0, n-k-1), n-k)): | |
return True |
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
# wymagania: pprint | |
import random | |
from pprint import pprint | |
# algorytm euklidesa | |
def gcd(a, b): | |
if (b == 0): | |
return a | |
return gcd(b, a % b) |
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
""" | |
Basic implementation of the Huffman algorithm for school. | |
Created according to https://riptutorial.com/algorithm/example/23995/huffman-coding | |
Author: Maciej Kaszkowiak (@asdfMaciej), 2020-05-08 | |
Licensed under GNU GPL | |
""" | |
from heapq import heappop, heappush | |
from collections import Counter |
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
""" | |
Usage: | |
scrape the XHR requests manually to files [tedious, but faster for me than implementing a scraper] | |
l01, l02.. etc should contain like requests | |
f1 f2 f3.. etc should contain followers | |
get a better like to follower ratio than ever lmao | |
""" | |
import json |
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
#!/usr/bin/python3 | |
# Python 3.x, licencja GNU GPL - Maciej Kaszkowiak (asdfMaciej), 2017 | |
import urllib | |
import urllib.request | |
import sqlite3 | |
import argparse | |
from time import gmtime, strftime | |