Skip to content

Instantly share code, notes, and snippets.

@brinnaebent
brinnaebent / bf1_9.py
Last active September 9, 2020 17:03
import pandas as pd
import matplotlib.pyplot as plt
# Import Data
data = pd.read_csv('scrubbed.csv')
data.head()
#Prepare "shapes" column for donut plot entry
shapes = data['shape'].value_counts(normalize=True) * 100
Keys = shapes.keys().to_list()
@gryte
gryte / slack-ifttt-autostatus.md
Created December 20, 2017 00:57
Slack IFTTT Automatically Update Status

enter an area - arrive at work - in the office

If Location, then Webhooks

webhooks field webhooks value
URL https://slack.com/api/users.profile.set
Method POST
Content Type application/x-www-form-urlencoded
Body authorization=Basic &token=TOKENHERE&profile={"status_text": "in the office","status_emoji":":office:"}
from typing import Tuple, NamedTuple, List, Optional, Dict
class SpendResult(NamedTuple):
is_successful: bool
remaining_balance: int
class Bank(object):
@orenitamar
orenitamar / Dockerfile
Last active March 22, 2024 05:13
Installing numpy, scipy, pandas and matplotlib in Alpine (Docker)
# Below are the dependencies required for installing the common combination of numpy, scipy, pandas and matplotlib
# in an Alpine based Docker image.
FROM alpine:3.4
RUN echo "http://dl-8.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories
RUN apk --no-cache --update-cache add gcc gfortran python python-dev py-pip build-base wget freetype-dev libpng-dev openblas-dev
RUN ln -s /usr/include/locale.h /usr/include/xlocale.h
RUN pip install numpy scipy pandas matplotlib