Skip to content

Instantly share code, notes, and snippets.

View manas-raj-shrestha's full-sized avatar
💻

Manas Shrestha manas-raj-shrestha

💻
View GitHub Profile
### Python script to split a labeled image dataset into Train, Validation, and Test folders.
# Author: Evan Juras, EJ Technology Consultants
# Date: 4/10/21
# Randomly splits images to 80% train, 10% validation, and 10% test, and moves them to their respective folders.
# This script is intended to be used in the TFLite Object Detection Colab notebook here:
# https://colab.research.google.com/github/EdjeElectronics/TensorFlow-Lite-Object-Detection-on-Android-and-Raspberry-Pi/blob/master/Train_TFLite2_Object_Detction_Model.ipynb
import glob
from pathlib import Path
@manas-raj-shrestha
manas-raj-shrestha / pub.json
Last active March 23, 2022 10:14
pub dart
{
"result": [{
"id": 1,
"name": "GetIt",
"url": "https://pub.dev/packages/get_it",
"likes": 2000,
"pub_points": 200,
"popularity": 100
},{
"id": 2,
@manas-raj-shrestha
manas-raj-shrestha / products.json
Created February 2, 2022 14:54
Flutter Unit Test Product Listing
{
"products": [
{
"id": 1,
"imageUrl": "https://i.imgur.com/oYZbJFb.jpg",
"name": "MacBook Pro 16-inch model",
"price": 2399
},
{
"id": 2,
[{"id":1,"city":"Khān Yūnis","street_address":"9 Marcy Pass","rental_price":"$4317.79","rating":3,"owner_name":"Myrlene Slyman","owner_phone_number":"7517874745","property_details":{"title":"Deluxe Apartment","bed_count":2,"type":"Apartment","bathroom_count":1,"laundry_count":3,"image":"https://na.rdcpix.com/1815684176/8ecb8b5c10a19ccbe1daba7bc38ec77cw-c324681xd-w685_h860_q80.jpg","description":"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum"},"facilities":[{"name":"Bedroom"},{"name":"Kitchen
[{
"application_id": 1,
"application_status": "Complete",
"applied_date": "22/09/2020",
"job": {
"id": 27,
"jd_title": "soto sot soto soto",
"work_details": "sotosoto sot soto sotosoto sot soto sotosoto sot soto sotosoto sot soto sotosoto sot soto sotosoto sot soto sotosoto sot soto sotosoto sot soto sotosoto sot soto sotosoto sot soto sotosoto sot soto sotosoto sot soto sotosoto sot soto sotosoto sot soto sotosoto sot soto sotosoto sot soto sotosoto sot soto sotosoto sot soto sotosoto sot soto sotosoto sot soto sotosoto sot soto sotosoto sot soto sotosoto sot soto sotosoto sot soto sotosoto sot soto sotosoto sot soto sotosoto sot soto sotosoto sot soto sotosoto sot soto sotosoto sot soto sotosoto sot soto sotosoto s",
"ssw_type": "素形材産業",
"expected_jlpt_level": "N2",
final NavigationService navigationService = locator<NavigationService>();
navigationService.navigateTo(routes.DashboardScreenRoute);
import 'package:get_it/get_it.dart';
import 'navigation_service.dart';
GetIt locator = GetIt.instance;
setupLocator() {
locator.registerLazySingleton<NavigationService>(() => NavigationService());
}
import 'package:flutter/material.dart';
class NavigationService {
static GlobalKey<NavigatorState> navigatorKey =
new GlobalKey<NavigatorState>();
navigateTo(String routeName, {dynamic arguments}) {
return navigatorKey.currentState.pushNamed(routeName, arguments: arguments);
}
import 'package:flutter/material.dart';
import '../constants/routes.dart' as routes;
class RouteGenerator {
static Route<dynamic> generateRoute(RouteSettings settings) {
final arguments = settings.arguments;
switch (settings.name) {
case '/':
@manas-raj-shrestha
manas-raj-shrestha / routes.dart
Last active December 31, 2020 18:45
Routes.dart
const String SignInScreenRoute = '/sign-in-screen';
const String SignUpScreenRoute = '/sign-up-screen';
const String DashboardScreenRoute = '/dashboard-screen';