Skip to content

Instantly share code, notes, and snippets.

View roarkemc's full-sized avatar
🔮

Roarke McNaught roarkemc

🔮
View GitHub Profile
import dash
import dash_core_components as dcc
import dash_html_components as html
import plotly.graph_objs as go
import pandas as pd
app = dash.Dash()
df = pd.read_csv(
'https://gist.githubusercontent.com/chriddyp/'
@anandology
anandology / rdash.py
Created June 22, 2017 06:21
POC implementation of reactive expressions for Dash
"""Reactive expressions for Dash!
Dash[1] is an interesting project build reactive web applications in Python.
While the ideas are exciting, the syntax for specifying custom code is way
too complicated that it should be.
Here is a sample code to display sum of two input values.
@app.callback(
[Input(component_id='x', component_property='value')]
@alysivji
alysivji / dash_app_template.py
Last active January 26, 2024 18:11
Dash app template
# standard library
import os
# dash libs
import dash
from dash.dependencies import Input, Output
import dash_core_components as dcc
import dash_html_components as html
import plotly.figure_factory as ff
import plotly.graph_objs as go

Workshop PyConf Hyderabad

Time Series Analysis with Python

With Applications of Machine Learning Algorithms

Session by Dr. Yves J. Hilpisch | The Python Quants GmbH

Hyderabad, 07. October 2017

@bshishov
bshishov / forecasting_metrics.py
Last active October 31, 2025 02:26
Python Numpy functions for most common forecasting metrics
import numpy as np
EPSILON = 1e-10
def _error(actual: np.ndarray, predicted: np.ndarray):
""" Simple error """
return actual - predicted
@import url('https://fonts.googleapis.com/css?family=Goudy+Bookletter+1911|Inconsolata|Lora|Slabo+27px|Song+Myung|Source+Serif+Pro|Roboto Mono');
* {
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
body {
font-family: 'Source Serif Pro', Lora, 'Slabo 27px', 'Goudy Bookletter 1911', serif;
line-height: 1.4em;
@josef-pkt
josef-pkt / ex_gam_bs_autos_cleaned.ipynb
Created November 13, 2018 17:36
Example: GAM in statsmodels
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@roarkemc
roarkemc / bobp-python.md
Created January 24, 2019 19:03 — forked from sloria/bobp-python.md
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens
@josef-pkt
josef-pkt / ex_gam_mpg_basic.ipynb
Created January 30, 2019 00:50
Basic GAM example with formula after merge
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
def coskew(df):
# Number of stocks
num = len(df.columns)
# Two dimionsal matrix for tensor product
mtx = np.zeros(shape = (len(df), num**2))
v = df.values
means = v.mean(0,keepdims=True)