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 math | |
| import pandas | |
| # Loading data into pandas Dataframe | |
| dataset = pd.read_csv(dataset_path) | |
| print(f'dataset {dataset.shape}') | |
| dataset.head() | |
| #Shuffling the Dataset |
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 math | |
| from typing import List | |
| def sliding_window(input_: List[int], kernel_: List[int]) -> List[int]: | |
| # Checking input and kernel length constraint | |
| if len(kernel_) > len(input_): | |
| raise ValueError("Input Size must be gratter than Kernel size") | |
| start_index = 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 os | |
| import sys | |
| import inspect | |
| currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) | |
| #print(currentdir) | |
| parentdir = os.path.dirname(currentdir) | |
| lib_path = os.path.join(parentdir,'src') | |
| #print(parentdir, lib_path) | |
| sys.path.insert(0,lib_path) |
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
| from dataclasses import dataclass, field | |
| from pprint import pprint | |
| import inspect | |
| @dataclass(frozen=True, init= False) | |
| class Dimension: | |
| height: float | |
| width: float | |
| depth: float |
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
| @dataclass(frozen=True, init= False) | |
| class Dimension: | |
| height: float | |
| width: float | |
| depth: float | |
| def __init__(self,height,width,depth ): | |
| object.__setattr__(self, "height", int(round(height))) | |
| object.__setattr__(self, "width", int(round(width))) | |
| object.__setattr__(self, "depth", int(round(depth))) |
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
| from dataclasses import dataclass, field | |
| from pprint import pprint | |
| import inspect | |
| @dataclass(frozen=True) | |
| class Dimension: | |
| height: float | |
| width: float | |
| depth: float |
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
| /* | |
| [dependencies] | |
| sqlx = { version = "0.5.9", features = [ "runtime-async-std-native-tls", "sqlite" ] } | |
| async-std = { version = "1.6", features = [ "attributes" ] } | |
| futures = "0.3.18" | |
| */ | |
| use std::result::Result; | |
| use sqlx::{sqlite::SqliteQueryResult, Sqlite, SqlitePool, migrate::MigrateDatabase}; |
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
| private registerListeners() { | |
| appWindow.listen('config-init', event => { | |
| console.log('registerListeners :', event.payload, event.event) | |
| }) | |
| appWindow.listen('page-loaded', event => { | |
| //console.log('page-loaded :', event.payload, event.event) | |
| appWindow.show() | |
| }) | |
| appWindow.once('tauri://close-requested', this.window_close_handeler) | |
| appWindow.once('tauri://destroyed', this.window_close_handeler) |
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
| use tauri::{plugin::Plugin, Runtime, Invoke, State, Window, PageLoadPayload, Manager}; | |
| use tauri::async_runtime::Mutex; | |
| use std::sync::Arc; | |
| use super::AppConfig; | |
| type Tconfig = Arc<Mutex<AppConfig>>; | |
| pub struct ConfigPlugin<R: Runtime> { | |
| invoke_handler: Box<dyn Fn(Invoke<R>) + Send + Sync>, | |
| } |
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
| use std::path::PathBuf; | |
| use std::default::Default; | |
| use std::{fs::File, fs}; | |
| use std::io::{prelude::*,Error,ErrorKind}; | |
| use serde::{Serialize, Deserialize}; | |
| use tauri::{Size,PhysicalSize, Position, PhysicalPosition}; | |
| pub mod config_plugin; |