Skip to content

Instantly share code, notes, and snippets.

View hjhilden's full-sized avatar

Jonatan Hildén hjhilden

View GitHub Profile
@hjhilden
hjhilden / swedishnlp.md
Created December 20, 2021 14:53
Install Swedish natural language processing for Python 3.9

Install and use Swedish natural language processing

Assuming using conda and python 3.9. Shoutout to all the creators of these tools! Check the respective instructions for the different packages before proceeding.

Install Lemmy with pip https://github.com/sorenlind/lemmy/ pip install lemmy

@hjhilden
hjhilden / layersFromArtboards-illustrator.js
Created October 15, 2021 14:31
Create layers from artboards in illustrator
// Script that moves all items from each artboard to a new layer with the same name as the artboard
// modified from answer by DilliamWowling
// https://community.adobe.com/t5/illustrator-discussions/multiple-artboards-to-multiple-layers/m-p/8922266#M43797
function layersFromArtboards()
{
var docRef = app.activeDocument;
@hjhilden
hjhilden / compoundword-reader-rotate.py
Created December 15, 2020 12:34
Compound word circle script for Nodebox Classic
# file is full system path to word list file with one word per line
wordlist = file(u"/MYHOMEFOLDER/finnish.txt","r" )
dstr = [line.rstrip("\n").decode("utf-8", "replace") for line in wordlist]
#w0 = u"tiede"
#w0l = len(w0)
#results =[]
#for e in dstr:
@hjhilden
hjhilden / helsinki-kaisaniemi-temp-daily-1960-2019.csv
Last active January 2, 2020 12:42
Kaisaniemi Christmas holiday snow depth graphic with Matplotlib
We can't make this file beautiful and searchable because it's too large.
Year,m,d,Time,Time zone,Precipitation amount (mm),Snow depth (cm),Air temperature (degC),Maximum temperature (degC),Minimum temperature (degC)
1960,1,1,00:00,UTC,-1,29,-1.5,0.1,-7.6
1960,1,2,00:00,UTC,-1,28,0.3,1.3,-0.5
1960,1,3,00:00,UTC,0.1,29,0,1.1,-0.6
1960,1,4,00:00,UTC,0,29,-0.2,0.1,-1
1960,1,5,00:00,UTC,17.6,29,0.4,1.9,-0.5
1960,1,6,00:00,UTC,8.7,47,-0.1,0.6,-0.6
1960,1,7,00:00,UTC,0.3,48,-6.2,0,-10.5
1960,1,8,00:00,UTC,0.8,48,-11.8,-10.3,-13.7
1960,1,9,00:00,UTC,-1,47,-13.1,-11,-13.6
@hjhilden
hjhilden / ai2html2react.py
Created April 25, 2019 08:42
Prototype command line script to convert ai2html output to valid React
import sys
import os
import re
dir_path = os.path.dirname(os.path.realpath(__file__)) + '/'
static_content_folder = 'static/custom/ai2html-output/'
# script takes two arguments "input" and "output" and optional static content folder arg
# .js extension is added to output