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
| # import cv2 library | |
| import cv2 | |
| # read the images | |
| english = cv2.imread('english.png') | |
| hungarian = cv2.imread('hungarian.png') | |
| slovak = cv2.imread('slovak.png') | |
| im_h = cv2.hconcat([english, hungarian, slovak]) |
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
| from datetime import datetime | |
| def years_until_now(input_year): | |
| return int(datetime.now().strftime('%Y')) - input_year | |
| the_prince_written_year = 1513 | |
| print(f'"The prince" was written {years_until_now(the_prince_written_year)} ago.') |
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
| import random | |
| first_group = [1, 2, 3] | |
| second_group = [5, 4, 6] | |
| third_group = [7, 8, 9] | |
| def print_winner(group, group_name): | |
| print(f'The winner from {group_name} is {random.choice(group)}') |
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
| actor_name = input() | |
| academy_scores = float(input()) | |
| number_of_evaluators = int(input()) | |
| needed_scores = 1250.5 | |
| for _ in range(number_of_evaluators): | |
| evaluator_name = input() | |
| scores_evaluator_gave = float(input()) | |
| received_scores = (len(evaluator_name) * scores_evaluator_gave) / 2 |
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
| fun main() { | |
| for (i in 1..10) { | |
| // Here we provide the logic | |
| // which must be repeated | |
| } | |
| } |
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
| // imagine this is the place where you usually | |
| // get the response in the normal application | |
| // you need just to pass here result variable | |
| // it will create a .txt file with the json | |
| // and download it. You need just to reuse this | |
| // mock file later. | |
| const element = document.createElement('a'); | |
| element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(JSON.stringify(results, null, ' '))); | |
| element.setAttribute('download', 'data.txt'); |
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
| package converter | |
| import java.math.BigInteger | |
| class NumberConverter( | |
| private val sourceBase: BigInteger, | |
| private val targetBase: BigInteger | |
| ) { | |
| private fun convertFromDecimal(decimalNumber: BigInteger): String { |
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
| package converter | |
| import java.math.BigInteger | |
| private const val MAXIMUM_OCTAL_SYSTEM = 10 | |
| private const val CAPITAL_LETTER_A = 64 | |
| class NumberConverter( | |
| private val sourceBase: BigInteger, |
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
| package converter | |
| fun main() { | |
| while (true) { | |
| println("Enter two numbers in format: {source base} {target base} (To quit type /exit)") | |
| val userChoice = readln() | |
| if (userChoice == "/exit") { | |
| break; | |
| } | |
| val conversionBases = userChoice.split("\\s+".toRegex()).map { |
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
| sdiff -l -w 166 .env .env-old | cat -n | grep -v -e '($' | awk -F '\\|[^[:alnum:]]+' '{print $1"| "$2}' > diff.txt |
NewerOlder