Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| // SolidSight backend pipeline — post-#107. | |
| // Import into draw.io: Arrange → Insert → Advanced → From Text → Graphviz DOT → paste. | |
| // Or render directly: `dot -Tsvg pipeline.dot -o pipeline.svg`. | |
| // | |
| // Shape: | |
| // input -> {reddit, hn, trends, producthunt, analog_finder} -> aggregator -> synthesizer -> END | |
| digraph SolidSightBackendPipeline { | |
| rankdir = LR; | |
| bgcolor = "#FFFFFF"; |
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 fasttext | |
| import fasttext.util | |
| from argparse import ArgumentParser | |
| # fasttext v0.9.2 | |
| # https://github.com/AlexKay28 | |
| def main(model_path, to_size, new_model_path): | |
| """ | |
| Reduce vectors size in fasttext model |
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 os | |
| def getInOut(orig_fun=None, path_in=None, path_out=None): | |
| def _decorate(fun): | |
| @functools.wraps(fun) | |
| def wrapper(*args, **kwargs): | |
| os.chdir(path_in) | |
| fun(*args, **kwargs) | |
| os.chdir(path_out) |