Skip to content

Instantly share code, notes, and snippets.


Emil Stenström EmilStenstrom

View GitHub Profile
View trello-list-to-slack-message.js
var s = [];
jQuery(".list:has(.list-header-name[aria-label='Kundo Knowledge'])").each(function() {
s.push("\n## " + jQuery(this).find(".list-header-name")[0].value + "\n");
jQuery(this).find(".list-card-title").each(function() {
s.push('• ' + this.innerText + ':' + jQuery(this).parents(".list-card").attr("href"));
View gist:9e35647f8b74d7e609ae69c01629ed23
(weatherapp) ~/Projects/weatherapp $ git push dokku master
Enumerating objects: 98, done.
Counting objects: 100% (98/98), done.
Delta compression using up to 12 threads
Compressing objects: 100% (70/70), done.
Writing objects: 100% (74/74), 16.97 KiB | 3.39 MiB/s, done.
Total 74 (delta 44), reused 0 (delta 0)
-----> Cleaning up...
-----> Building weatherapp from herokuish...
-----> Adding BUILD_ENV to build environment...
View make.log
~/tmp/Python-2.7.15 $ make -d
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
This program built for i386-apple-darwin11.3.0
Reading makefiles...
Reading makefile `Makefile'...
View build.log
~/tmp $ wget
--2019-06-15 12:30:48--
Resolving (, 2a04:4e42:14::223
Connecting to (||:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 12642436 (12M) [application/octet-stream]
Saving to: ‘Python-2.7.15.tar.xz’
Python-2.7.15.tar.xz 100%[==================================================>] 12,06M 39,8MB/s in 0,3s
View gist:c0c2be063fb0a595c4639ea950d4421b
~ $ env PYENV_DEBUG=1 pyenv install -v 2.7.15
+ [pyenv:22] enable -f /usr/local/bin/../libexec/pyenv-realpath.dylib realpath
+ [pyenv:29] '[' -z '' ']'
++ [pyenv:31] type -p greadlink readlink
++ [pyenv:31] head -1
+ [pyenv:31] READLINK=/usr/bin/readlink
+ [pyenv:32] '[' -n /usr/bin/readlink ']'
+ [pyenv:54] '[' -z '' ']'
+ [pyenv:55] PYENV_ROOT=/Users/EmilStenstrom/.pyenv
+ [pyenv:59] export PYENV_ROOT
EmilStenstrom /
Created Aug 31, 2018
Python wrapper for the (very raw) python interface for ufal.udpipe. Saving it here for posterity.
import re
from ufal.udpipe import Model, Pipeline, ProcessingError
class Parser:
"swe": "data/swedish-ud-2.0-170801.udpipe",
def __init__(self, language):
model_path = self.MODELS.get(language, None)
import bz2
import os
import re
from collections import defaultdict
from enum import Enum, auto
from conllu import parse
from import Swedish
from gensim.models import TfidfModel
from gensim.corpora import Dictionary
class MyCorpus:
def __init__(self, documents):
self.documents = documents
self.dictionary = Dictionary(documents)
def __iter__(self):
View kundo-events.js
This script can be embedded on any page with Kundo Chat, and will change the contents
of an element on the page, depending on if the customer can start a new chat or not.
To change what's shown, change CHAT_AVAILABLE_HTML and CHAT_UNAVAILABLE_HTML to
anything you want. To add a button that starts the chat, add a call to
View nonscrolling_layer.html
<!DOCTYPE html>
<meta charset="utf-8">
html, body { height: 100%; }
body { font-size: 4em; color: rgba(0,0,0,0.1); }
body.noscroll {
overflow: hidden;
You can’t perform that action at this time.