Skip to content

Instantly share code, notes, and snippets.

View dylanjcastillo's full-sized avatar

Dylan Castillo dylanjcastillo

View GitHub Profile
View .zshrc
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/Users/dylancastillo/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See
dylanjcastillo /
Last active May 6, 2020 14:46
KPI Card Component Dash
import dash
import dash_html_components as html
import dash_bootstrap_components as dbc
external_stylesheets = [dbc.themes.BOOTSTRAP, "assets/style.css"]
def card(name, desc, value, color):
"""KPI Card Component"""
return dbc.Col(
1. Setup a Twitter Developer account and create new App, get its consumer key and consumer secret and replace them below
2. Replace TWEETS_DB, QUERY, and LANGUAGE values
3. Install required packages: `pip install tweepy schedule`
4. Run process using `python`
import tweepy
import sqlite3
import datetime
import csv
import boto3
import gspread
import jinja2
from oauth2client.service_account import ServiceAccountCredentials
View template.html
<!doctype html>
<html lang="en">
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link href="" rel="stylesheet"
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<title>My Pokemon Stats</title>
dylanjcastillo /
Last active February 29, 2020 12:38
Code for post "Fast & Asynchronous: Accelerate Your Requests Using Python's asyncio"
import aiohttp
import asyncio
import os
from aiohttp import ClientSession