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
;; | |
; Calculate sqrt using newton iteration method | |
; Assembly version of https://gist.github.com/Lukas0025/b6aacb8d2a5d79d51d2f9ca7cd5af2ab with fixed iteration count | |
; @autor Lukáš Plevač <lukas@plevac.eu> | |
; @date 6.8.2021 | |
; Under CC0 | |
; | |
%include "io.inc" |
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
## | |
# Calculate sqrt using newton iteration method | |
# @autor Lukáš Plevač <lukas@plevac.eu> | |
# @date 6.8.2021 | |
# Under CC0 | |
# | |
import math | |
# |
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
<?php | |
/** | |
* mysqli mockup for testing | |
* @autor Lukáš Plevač <lukas@plevac.eu> | |
* @date 16.6.2021 | |
* CC0 license - No Rights Reserved. | |
* | |
*/ | |
/** |
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
# Calculate pi using numeric integration | |
# @autor Lukáš Plevač <xpleva07@vutbr.cz> (BUT FIT) | |
# @date 2.6.2021 | |
# CC0 license - No Rights Reserved. | |
# | |
# taken from the relationship: | |
# | |
# pi * r ** 2 S of circle | |
# ------------ = -------------------------- | |
# (2r) ** 2 S of square around circle |
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
# Calculate pi by random numbers between 0 and 1 | |
# @autor Lukáš Plevač <xpleva07@vutbr.cz> (BUT FIT) | |
# @date 1.6.2021 | |
# CC0 license - No Rights Reserved. | |
import random | |
import math | |
## | |
# Calculate distance between point and [0,0] |
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
% Basics in Prolog language | |
% @autor Lukáš Plevač <xpleva07@vutbr.cz> | |
% @date 1.6.2021 | |
% under CC0 | |
% mod([list of numbers], mod by num, [res]) | |
mod([], _, []). | |
mod([H|T], X, [G|L]) :- G is H mod X, mod(T, X, L). | |
%mod([H|T], X, [G|L]) :- ownmod(H, X, G), mod(T, X, L). |
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
## | |
# k-mean clustering algoritm | |
# @autor Lukáš Plevač <xpleva07@vutbr.cz> | |
# @date 5.5.2021 | |
# CC0 license - No Rights Reserved. | |
# | |
import numpy as np | |
import os |