Skip to content

Instantly share code, notes, and snippets.

@DrRoad
DrRoad / Dockerfile
Created August 19, 2024 21:13 — forked from berkorbay/Dockerfile
Deploying Shiny Python on Cloud Run on GCP with Macbook M1 and later
FROM python:3.10-slim
ENV APP_HOME /app
WORKDIR $APP_HOME
# Allow statements and log messages to immediately appear in the Knative logs
ENV PYTHONUNBUFFERED True
ENV PORT 8080
RUN pip install --no-cache-dir --upgrade shiny
---
title: "Classify"
output:
flexdashboard::flex_dashboard:
orientation: columns
#logo: # add the relative path/file.png
#favicon: # add the relative path/file.png
theme: bootstrap
#css: custom.css # add the relative path/file.css
vertical_layout: fill
/**
* @license
* Copyright 2020 Google
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@DrRoad
DrRoad / app.py
Created September 22, 2021 02:38 — forked from hananather/app.py
@author: hananather
"""
import dash
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output
import pandas as pd
import plotly.express as px
import dash_bootstrap_components as dbc
from plotly import graph_objs as go
@DrRoad
DrRoad / Makefile
Created September 20, 2021 22:29 — forked from ramnathv/Makefile
Rmd to IPython Notebook and HTML
all: example.ipynb example.html
example.md: example.Rmd
./knit
example.ipynb: example.md
notedown example.md | sed '/%%r/d' > example.ipynb
example.html: example.Rmd
R -e "knitr::knit2html('example.Rmd')"
@DrRoad
DrRoad / shinyApp.R
Created May 4, 2021 02:39 — forked from RCura/shinyApp.R
Shiny / R : csv to shapefile
require(shiny)
require(sp)
require(rgdal)
runApp(
list(
ui = bootstrapPage(
fileInput('inputdata', 'Input file',accept=c('.csv')),
plotOutput("xyPlot"),
downloadButton('downloadShp', 'DownloadSHP')
),
@DrRoad
DrRoad / README.md
Created March 16, 2021 22:44 — forked from jcheng5/README.md
Using arbitrary Leaflet plugins with Leaflet for R

Using arbitrary Leaflet JS plugins with Leaflet for R

The Leaflet JS mapping library has lots of plugins available. The Leaflet package for R provides direct support for some, but far from all, of these plugins, by providing R functions for invoking the plugins.

If you as an R user find yourself wanting to use a Leaflet plugin that isn't directly supported in the R package, you can use the technique shown here to load the plugin yourself and invoke it using JS code.

@DrRoad
DrRoad / mtq.R
Created March 3, 2021 22:06 — forked from rCarto/mtq.R
library(raster)
library(cartography)
library(sf)
library(SpatialPosition)
mtq <- st_read(system.file("shape/martinique.shp", package="cartography"))
# use WGS84 proj
mtq_latlon <- st_transform(mtq, 4326)
# this call throw an error but seems to work...
getData('SRTM', lon=-61, lat=14)
@DrRoad
DrRoad / Readme.md
Created February 18, 2021 02:46 — forked from timelyportfolio/Readme.md
really dumb way to combine Vue and Shiny in R

See the following for more examples combining R/Shiny and vuejs. All keep a global state store (not good practice) updated by shiny::sendCustomMessage().

  1. simple example
  2. more advanced d2b sunburst example

Code

Please note this is for illustration purposes only. vue is not needed at all, since all of this can easily be handled within Shiny.

## segNet[https://arxiv.org/pdf/1511.00561.pdf] [2016]
* https://github.com/preddy5/segnet [Keras]
* https://github.com/imlab-uiip/keras-segnet
## DeepLab[https://arxiv.org/pdf/1606.00915.pdf] [2017]
* https://github.com/DrSleep/tensorflow-deeplab-resnet
## FCN [https://arxiv.org/pdf/1605.06211.pdf] [2016]
* https://github.com/aurora95/Keras-FCN [Keras]
* https://github.com/k3nt0w/FCN_via_keras [Keras]
## ENet [https://arxiv.org/pdf/1606.02147.pdf] [2016]
* https://github.com/e-lab/ENet-training [Torch]