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
quotes = ['"', '❞', '❝', '„', '“', '‟', '”', '”', '⹂'] | |
desired_quotes = ('„', '“') | |
def fix_quotes(text: str) -> str: | |
text = text.replace(',,', '"') | |
text = text.replace("''", '"') | |
j = 0 | |
T = [t for t in text] | |
for i in range(len(T)): |
POST /api/performance/v1/test-entities/action
- cannot contain path parameters - collisions are unavoidable
- ALL parameters are in query
- CRUD operations are denoted with
crud
prefix (/api/performance/crud/v1/...
) - CRUD may contain path parameters (they do not collide)
POST /api/performance/v1/test-entities/
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
#!/usr/bin/env python3 | |
# | |
# All team solutions **must** list **all** members of the team. | |
# The members must be listed using their ReCodEx IDs anywhere | |
# in a comment block in the source file (on a line beginning with `#`). | |
# | |
# You can find out ReCodEx ID in the URL bar after navigating | |
# to your User profile page. The ID has the following format: | |
# 310a5c89-3ea1-11e9-b0fd-00505601122b | |
# 90257956-3ea2-11e9-b0fd-00505601122b |
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
#!/usr/bin/env python3 | |
import numpy as np | |
import tensorflow as tf | |
import decoder | |
from morpho_dataset import MorphoDataset | |
class Network: | |
def __init__(self, args, num_source_chars, num_target_chars): | |
class Model(tf.keras.Model): |
Batch:
- forms
- lemmas
- tags
We have sentences and want to predict classes (nouns, verbs, ..)
- we can specify mask which specifies number of words in sentence and "disables" parts of NN which will not be used (since we have less data). This will influence even the loss function
- 1 for used place, 0 for not used (
tf.keras.layers.Masking
)
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
jakub@Marvn:~/Projects$ lb4 project | |
? Project description: project | |
? Project root directory: project | |
? Application class name: ProjectApplication | |
? Select features to enable in the project Enable tslint, Enable prettier, Enable moch | |
a, Enable loopbackBuild, Enable vscode, Enable repositories, Enable services | |
create .npmrc | |
create .prettierignore | |
create .prettierrc | |
create DEVELOPING.md |
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
attach(train) | |
m.tree <- rpart(mpg01 ~ ., train) | |
rpart.plot(m.tree) | |
prediction.m.tree <- predict(m.tree, test, type="class") | |
table(prediction.m.tree) | |
m.tree.cm <- table(prediction.m.tree, test$mpg01) | |
m.tree.cm | |
message("Accuracy = ", sum(diag(m.tree.cm))/78) |
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 io | |
import json | |
import sys | |
def tokenize(line): | |
return [token.strip() for token in line.split(':')] | |
def getSnapshot(line, idx, f): |
NewerOlder