Skip to content

Instantly share code, notes, and snippets.

View jrhone's full-sized avatar

Jonathan R jrhone

View GitHub Profile
import streamlit as st
import streamlit.ReportThread as ReportThread
from streamlit.server.Server import Server
import time
import functools
import random
import string
# Copied from tvst's great gist:
import streamlit as st
import altair as alt
import pandas as pd
import erddapy
from vega_datasets import data
# Connect to ERDDAP
st.title('SWOT Prawler Data')
e = erddapy.ERDDAP('http://heron.pmel.noaa.gov:8080/erddap', protocol='tabledap')
e.dataset_id = 'TELON001_PRAWC_N001' # Data Set to Use
# -*- coding: utf-8 -*-
# Copyright 2018-2019 Streamlit Inc.
#
# 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
#
# Unless required by applicable law or agreed to in writing, software
import streamlit as st
import pandas as pd
import numpy as np
# Step 1: CREATE A MAP DATAFRAME WITH red green AND blue COLUMNS
sf_lat, sf_lon = [37.76, -122.4]
radius = 50
df = pd.DataFrame(
np.random.randn(1000, 2) / [radius, radius] + [sf_lat, sf_lon],
from typing import Tuple
import pandas as pd
import plotly.express as px
import streamlit as st
import pathlib
DATA_LOCAL = pathlib.Path(__file__).parent / "country_indicators.csv"
from typing import Tuple
import pandas as pd
import plotly.express as px
import streamlit as st
import pathlib
DATA_LOCAL = pathlib.Path(__file__).parent / "country_indicators.csv"
@jrhone
jrhone / transporter.txt
Created April 29, 2017 13:57
transporter issue
var source = mongodb({
"uri": "mongodb://user:pass@db:27017/mongo_app_develop?authSource=admin",
"ssl": true,
"bulk": false,
})
var sink = elasticsearch({
"uri": "http://ip:9200/mongo_app_develop"
})
{
"message": "ok",
"result": {
"count": 2,
"products": [
{
"categoryNamePath": "Additional",
"categoryId": 99999,
"mpid": "1c444b4138d6df9be39cdb7c0f77bade",
"categoryName": "Additional",
@jrhone
jrhone / gist:5935725
Created July 5, 2013 16:37
Meteor Mongo Aggregation Framework using Publish
------------
CLIENT
------------
Calories = new Meteor.Collection("calories")
Deps.autorun( ->
try
Meteor.subscribe('count_by_day', Meteor.user().services.facebook.email)
catch err