Skip to content

Instantly share code, notes, and snippets.

@svenski
svenski / MultiLabelFbeta_bug.py
Created July 9, 2019 20:27
MultilabelFbeta bug reproducible code
from fastai import *
from fastai.text import *
bs=48
path = untar_data(URLs.IMDB)
path.ls()
data_lm = (TextList.from_folder(path)
.filter_by_folder(include=['train', 'test', 'unsup'])
❯ bind | grep forward
bind --preset -M insert -k right forward-char
bind --preset -M insert \e\[C forward-char
bind --preset -M insert \e\eOC nextd-or-forward-word
bind --preset -M insert \e\e\[C nextd-or-forward-word
bind --preset -M insert \eO3C nextd-or-forward-word
bind --preset -M insert \e\[3C nextd-or-forward-word
bind --preset -M insert \e\[1\;3C nextd-or-forward-word
bind --preset -M insert \e\[1\;9C nextd-or-forward-word
bind --preset -M insert \e\eOB history-token-search-forward
@svenski
svenski / text2graph.py
Created April 6, 2019 10:30
NLP dojo on finding characters in Emma
import spacy
import nltk
from nltk.corpus import gutenberg
#nlp = spacy.load('en')
nlp = spacy.load('en_core_web_sm')
import random
import pandas as pd
import matplotlib.pyplot as plt
import re
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

ODSC Europe 2017 (London)

Algorithmic Trading

With Machine & Deep Learning

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

London, 12. October 2017

@svenski
svenski / keybase.md
Last active October 5, 2017 19:15
keybase

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

### Keybase proof
I hereby claim:
* I am svenski on github.
* I am svenski (https://keybase.io/svenski) on keybase.
* I have a public key ASBG_J1MEir5FWPQaxh5q4xSvGmIwymFiS7Unbi_RPbAgAo
To claim this, I am signing this object:
### Keybase proof
I hereby claim:
* I am svenski on github.
* I am svenski (https://keybase.io/svenski) on keybase.
* I have a public key ASBG_J1MEir5FWPQaxh5q4xSvGmIwymFiS7Unbi_RPbAgAo
To claim this, I am signing this object:
@svenski
svenski / tsp_plot.py
Last active January 14, 2017 16:53 — forked from payoung/tsp_plot.py
Python function that plots the data from a traveling salesman problem that I am working on for a discrete optimization class on Coursera. It can take multiple iterations of the path between nodes and plot out the current path as well as the old paths. Helps with troubleshooting and improving the algorithms that I am working on.
import matplotlib.pyplot as plt
def plotTSP(paths, points, num_iters=1):
"""
path: List of lists with the different orders in which the nodes are visited
points: coordinates for the different nodes
num_iters: number of paths that are in the path list
"""
Tim Group office temperature
============================
```{r tempRead, echo = FALSE, message = FALSE, warning = FALSE}
library(ggplot2)
library(data.table)
library(lubridate)
tt <- (read.csv("temp.csv", header = FALSE)