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
package by.iba.gomel; | |
import java.util.Scanner; | |
/** | |
* This class contains third dimensions array of char and tools for work with this array. | |
* | |
*/ | |
public class CharArray { | |
private final char[][][] arrayOfChar; |
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
import requests | |
import re | |
from bs4 import BeautifulSoup | |
#вызываемая функция для каждого раздела | |
def parse(page): | |
global kek | |
htmlPage = requests.get(page) | |
soup = BeautifulSoup(htmlPage.text , "html.parser") | |
while (soup.find('a' , id="link-pagination-next")) : |
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
import System.IO | |
import Data.Char (toLower) | |
process :: (Int, Int) -> [Int] -> [[Int]] | |
process (m, k) tasks = tasks : (process' (m, k) tasks) | |
process' (m, k) [] = [] | |
process' (m, k) tasks = processed : (process' (m, k) processed) where processed = (drop m tasks) ++ (filter (>0) $ map (subtract k) (take m tasks)) | |
showProcessed :: (Int, Int) -> [[Int]] -> String | |
showProcessed mk lst = trim (showProcessed' mk lst) ++ "\nTime: " ++ (show $ 6*(length $ tail lst)) ++ "\n" |
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 money import Money, Currency | |
from enum import Enum | |
from string import ascii_letters | |
class TokenType(Enum): | |
NAME = 0 | |
NUMBER = 1 | |
MONEY = 2 |
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
class Provider: | |
def __init__(self, name): | |
self.name = name | |
def __getattr__(self, attr): | |
return Provider(self.name + '.' + str(attr)) | |
def __rmatmul__(self, other): | |
return other + '@' + self.name |
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
__bases__ = (dict, ) | |
def __missing__(self, key): | |
self[key] = key | |
return key |