Skip to content

Instantly share code, notes, and snippets.

Avatar

Moritz Körber moritzkoerber

View GitHub Profile
@moritzkoerber
moritzkoerber / release.yml
Created Aug 14, 2021
Manual PyPi Release GitHub Actions Workflow
View release.yml
name: Manual PyPi Release
on:
workflow_dispatch:
inputs:
package_repository:
description: '"testpypi" or "pypi"'
required: true
tag:
required: true
View plotly_bars_create_plot.py
import plotly.graph_objects as go
fig = go.Figure()
fig.update_layout(
template="simple_white",
xaxis=dict(title_text="Week"),
yaxis=dict(title_text="Count"),
barmode="stack",
)
View plotly_bars_create_df.py
import pandas as pd
df = pd.DataFrame(
dict(
week=[1, 1, 2, 2, 3, 3] * 2,
layout=["classic", "classic", "modern", "modern"] * 3,
response=["conversion", "exit"] * 6,
cnt=[26, 23, 45, 34, 55, 44, 53, 27, 28, 25, 30, 34],
)
)
View plotly_buttons_create_button3.py
def convert_to_sixpack(x):
return x / 6
fig.update_layout(
updatemenus=[
dict(
type="buttons",
direction="right",
x=0.7,
View plotly_buttons_create_button2.py
df["scoops"] = df["ice_cream_cones"] * 2
fig.update_layout(
updatemenus=[
dict(
type="buttons",
direction="right",
x=0.7,
y=1.2,
showactive=True,
View plotly_buttons_create_button1.py
fig.update_layout(
updatemenus=[
dict(
type="buttons",
direction="right",
x=0.7,
y=1.2,
showactive=True,
buttons=list(
[
View plotly_buttons_create_fig.py
import plotly.graph_objects as go
fig = go.Figure()
fig.add_trace(
go.Scatter(
x=df.temperature,
y=df.ice_cream_cones,
name="Ice Cream",
marker_color="#2457BD",
View plotly_buttons_create_df.py
import pandas as pd
df = pd.DataFrame(
dict(temperature=[24, 26, 28], ice_cream_cones=[14, 20, 23], drinks=[18, 22, 28])
)
@moritzkoerber
moritzkoerber / model_training_for_text_analysis.py
Last active Mar 8, 2021
Trains a model to analyze text messages.
View model_training_for_text_analysis.py
import argparse
import pickle
import string
import sys
import nltk
import pandas as pd
from nltk.corpus import stopwords
from nltk.stem.wordnet import WordNetLemmatizer
from nltk.tokenize import word_tokenize
View keybase.md

Keybase proof

I hereby claim:

  • I am moritzkoerber on github.
  • I am moritzkoerber (https://keybase.io/moritzkoerber) on keybase.
  • I have a public key ASBagXNuNawc5COk1wSUH57zvRWiy4bM8o7ZeCxKWVv06Ao

To claim this, I am signing this object: