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 | |
class Pagination | |
{ | |
public $page; | |
public $totalCount; | |
public $perPage; | |
public $hasNext; | |
public $hasPrev; |
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 visualize_grid_cv_params(grid_cv): | |
df = pd.DataFrame(grid_cv.cv_results_['params']) | |
df['score'] = grid_cv.cv_results_['mean_test_score'] | |
fig, axes = plt.subplots(1, len(grid_cv.param_grid), sharey=True, figsize=(15,4)) | |
i = 0 | |
for param in grid_cv.param_grid: | |
data = df.groupby(param).mean()['score'].to_dict() | |
param_values = list(data.keys()) |
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
"""serializers""" | |
import logging | |
from collections import Mapping, OrderedDict | |
from typing import Dict | |
from django.core.exceptions import ValidationError as DjangoValidationError | |
from rest_framework import serializers | |
from rest_framework.exceptions import ValidationError | |
from rest_framework.fields import get_error_detail, set_value, SkipField | |
from rest_framework.settings import api_settings |
OlderNewer