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
| def _log(message): | |
| print('[SimpleTimeTracker] {function_name} {total_time:.3f}'.format(**message)) | |
| @simple_time_tracker(_log) | |
| def load(): | |
| df = pd.read_csv('/home/toubi/Works/sicara/h3/HyperCube/App/Demo/Demo/Titanic.csv', delimiter=';') | |
| return df | |
| @simple_time_tracker(_log) |
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 time | |
| from functools import wraps | |
| _total_time_call_stack = [0] | |
| def better_time_tracker(log_fun): | |
| def _better_time_tracker(fn): | |
| @wraps(fn) | |
| def wrapped_fn(*args, **kwargs): | |
| global _total_time_call_stack |
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
| def _log(message): | |
| print('[BetterTimeTracker] {function_name} {total_time:.3f} {partial_time:.3f}'.format(**message)) | |
| @better_time_tracker(_log) | |
| def load(): | |
| df = pd.read_csv('/home/toubi/Works/sicara/h3/HyperCube/App/Demo/Demo/Titanic.csv', delimiter=';') | |
| return df | |
| @better_time_tracker(_log) |
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
| ``` | |
| | datetime | city | temperature | | |
| |---------------------|-------|-------------| | |
| | 1996-07-01 02:00:00 | paris | 15.0 | | |
| | | | | | |
| | | | | | |
| ``` |
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 mongots | |
| from datetime import datetime | |
| from csv import DictReader | |
| temperature_collection = mongots.MongoTSClient().ClimaticDataDb.temperatures | |
| with open('./weather_data.csv') as file: | |
| reader = DictReader(file, delimiter=';') | |
| failed = 0 |
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
| const exec = require('child_process').exec; | |
| class CheckGitBranchBeforeDeploy { | |
| constructor (serverless, options) { | |
| this.commands = { | |
| deploy: { | |
| lifecycleEvents: [ | |
| 'resources', | |
| ] |
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
| stages: | |
| download_dataset: | |
| cmd: ( | |
| wget https://storage.googleapis.com/mledu-datasets/cats_and_dogs_filtered.zip | |
| -O cats_and_dogs_filtered.zip && | |
| unzip cats_and_dogs_filtered.zip -d data/raw && | |
| rm cats_and_dogs_filtered.zip | |
| ) | |
| outs: | |
| - data/raw |
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
| stages: | |
| download_dataset: ... | |
| split_dataset: | |
| cmd: python scripts/split_dataset.py | |
| deps: | |
| - scripts/split_dataset.py | |
| - data/raw | |
| outs: | |
| - data/dataset/train |
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
| stages: | |
| download_dataset: ... | |
| split_dataset: ... | |
| train: | |
| cmd: python scripts/train.py | |
| deps: | |
| - scripts/train.py | |
| - data/dataset/train | |
| - data/dataset/val |