Skip to content

Instantly share code, notes, and snippets.

View gautamchitnis's full-sized avatar
🎯
Focusing

Gautam Chitnis gautamchitnis

🎯
Focusing
View GitHub Profile
Get Flutter setup from https://flutter.dev/docs/get-started/install
Link to base tutorial https://medium.com/@jackwong_60367/cloud-function-flutter-128b8c3695b4
@gautamchitnis
gautamchitnis / detectron2_balloon_sample
Last active December 17, 2019 19:08
* DOES NOT WORK *
import os
import random
import cv2
import numpy as np
import json
from detectron2.structures import BoxMode
import itertools
from detectron2.data import DatasetCatalog, MetadataCatalog
@gautamchitnis
gautamchitnis / error
Created December 17, 2019 19:58
detectron2 compile error
(dd) F:\dd\conan_det\detectron2>python setup.py build develop
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\detectron2
copying detectron2\__init__.py -> build\lib.win-amd64-3.7\detectron2
creating build\lib.win-amd64-3.7\detectron2\checkpoint
copying detectron2\checkpoint\c2_model_loading.py -> build\lib.win-amd64-3.7\detectron2\checkpoint
copying detectron2\checkpoint\catalog.py -> build\lib.win-amd64-3.7\detectron2\checkpoint
"C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" run start --scripts-prepend-node-path=auto
> [email protected] start C:\Users\Gautam\WebstormProjects\node-tfjs
> node app.js
2020-04-07 05:24:26.641209: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
2020-04-07 05:24:28.569454: I tensorflow/cc/saved_model/reader.cc:31] Reading SavedModel from: F:\dd\office_work\mrcnn_serving_ready-master\mrcnn_serving_ready-master\tooth_type\serving_model\2
2020-04-07 05:24:28.698509: I tensorflow/cc/saved_model/reader.cc:54] Reading meta graph with tags { serve }
2020-04-07 05:24:29.021046: I tensorflow/cc/saved_model/loader.cc:202] Restoring SavedModel bundle.
2020-04-07 05:24:29.024479: I tensorflow/cc/saved_model/loader.cc:212] The specified SavedModel has no variables; no checkpoints were restored. File does not exist: F:\dd\office_work\mrcnn_serving_ready-ma
@gautamchitnis
gautamchitnis / Modal.vue
Last active August 13, 2020 13:24
I would like to fetch the data for checklist modal dynamically (using an API call to backend server). currently the rendered version shows an integer instead of the actual value.
<template>
<transition name="modal">
<div class="modal-mask">
<div class="modal-wrapper">
<div class="modal-container">
<div class="modal-header">
<slot name="header">
</slot>
</div>
@gautamchitnis
gautamchitnis / main.dart
Last active March 24, 2021 14:23
Flutter Camera Plugin Advanced Example WITHOUT NULL SAFETY
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// ignore_for_file: public_member_api_docs
import 'dart:async';
import 'dart:io';
import 'package:camera/camera.dart';
@gautamchitnis
gautamchitnis / README.md
Created May 15, 2021 21:10
Nginx Serve Static Files from /root

NOTE: It is not advisable to do this, use /var/www/ or similar directories to store your static files.

Okay, now if you must keep your files in /root then follow along.

Consider the static files are in /root/site/static/ path.

  1. Run sudo chmod -R 0755 /root
  2. Run sudo chmod -R 0755 /root/site
  3. Run sudo chown -R "$USER":www-data /root/site (replace www-data with the username of your nginx user with whatever user is used in nginx.conf usually located at /etc/nginx)
  4. Restart Nginx, now your static files should be accessible.