trans_func = {('q0', 'a,b') : 'q1',
('q1','a,b'): 'q0'}
final_state = automata(organize_func(trans_func), 'aabb')
is_aceppeted(['q0'], final_state)
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
# Ref.: https://en.wikipedia.org/wiki/Goodstein%27s_theorem#Goodstein_sequences | |
@kwdef struct GoodsteinTerm | |
coefficient::Int | |
base::Int | |
exp::Int | |
value::Function = () -> coefficient * base ^ exp | |
end | |
function factorize(n::Int, base::Int, tmp_arr=[]) |
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
0koryu0.easter.ne.jp | |
109-204-26-16.netconnexion.managedbroadband.co.uk | |
1866809.securefastserver.com | |
2amsports.com | |
4dexports.com | |
50efa6486f1ef.skydivesolutions.be | |
61kx.uk-insolvencydirect.com | |
6b8a953b2bf7788063d5-6e453f33ecbb90f11a62a5c376375af3.r71.cf5.rackcdn.com | |
97b1c56132dfcdd90f93-0c5c8388c0a5897e648f883e2c86dc72.r54.cf5.rackcdn.com | |
999fitness.com |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
def split_by_comma(fn): | |
def wrapper(sentence): | |
return fn(sentence).split(',') | |
return wrapper | |
@split_by_comma | |
def transform_content(content): | |
return content.swapcase() |
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
def split_by(character): | |
return lambda content: content.split(character) | |
split_by_comma = split_by(', ') | |
split_by_comma('This, Is, A, Content, Example') | |
#result: | |
#['This', 'Is', 'A', 'Content', 'Example'] |
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
____________________________ | |
___ /____ _/_ ____/__ | | |
__ / __ / _ / __ /| | | |
_ /____/ / / /___ _ ___ | | |
/_____/___/ \____/ /_/ |_| | |
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
""" | |
Stratified K-Fold implementation | |
""" | |
def stratified_k_fold(arr, k=None, class_ratio=.5): | |
if k == None: | |
return None | |
number_elements_fold = len(arr) // k | |
folds = [[]] * k |
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 time | |
import random | |
comparison_num = 0 | |
class Quick(object): | |
def particao(self, a, ini, fim): | |
global comparison_num | |
comparison_num += 1 | |
pivo = a[fim-1] |
NewerOlder