Skip to content

Instantly share code, notes, and snippets.

import subprocess
from sphinx.errors import ExtensionError
from sphinx.util import logging
from sphinx.transforms.post_transforms.images import ImageConverter
from sphinx.util.osutil import ENOENT, EPIPE, EINVAL
logger = logging.getLogger(__name__)
class InkscapeConverter(ImageConverter):
@Balletie
Balletie / munari_small.jpg
Last active March 17, 2018 13:54
LSystems in python with turtle graphics
munari_small.jpg
from __future__ import print_function
import praw
import textwrap
import types
from HTMLParser import HTMLParser
wrapper = textwrap.TextWrapper(width=100, break_long_words=False, replace_whitespace=False)
h = HTMLParser()
def print_comment_term(comment, level):
//...
rules // lookup method
lookupMethod(ObjV(c, sup, _, ms), name) --> m
where
case ms[name?] of {
true =>
ms[name] => m
false =>
package paplj.interpreter.generated.terms;
import org.spoofax.interpreter.core.Tools;
import org.metaborg.meta.lang.dynsem.interpreter.terms.ITerm;
import org.spoofax.interpreter.terms.*;
import com.oracle.truffle.api.CompilerAsserts;
public abstract class IVTerm implements ITerm
{
public static IVTerm create(IStrategoTerm term)
diff --git a/research/.latexmkrc b/research/.latexmkrc
index 41d7a69..ecf1299 100644
--- a/research/.latexmkrc
+++ b/research/.latexmkrc
@@ -1,2 +1,2 @@
$pdf_mode = 1;
-$pdflatex = 'xelatex -synctex=1 -interaction=nonstopmode %O %S';
+$pdflatex = 'xelatex -synctex=1 -shell-escape -interaction=nonstopmode %O %S';
diff --git a/research/01-problem.tex b/research/01-problem.tex
index 361c39b..5f8f123 100644
spoofaxEclipse = with pkgs.eclipses; eclipseWithPlugins {
eclipse = eclipse-platform;
jvmArgs = [
"-Xss16m"
"-Xms1024m"
"-Xmx1024m"
"-XX:MaxPermSize=256m"
"-server"
"-Djava.net.preferIPv4Stack=true"
];
#!/bin/sh
# Browse files with dmenu.
# usage: set ls arguments with "--ls", and dmenu arguments with "--dm"
# Can be interleaved.
# e.g. "--ls -al --dm -p "Hello" --ls -G" will have the following arguments:
# ls: -al -G
# dmenu: -p "Hello"
# The last argument before the first occurence of "--ls" or "--dm" is the path
# to start browsing at.
[ 31.981]
X.Org X Server 1.17.4
Release Date: 2015-10-28
[ 31.981] X Protocol Version 11, Revision 0
[ 31.981] Build Operating System: Linux 3.14.54 x86_64
[ 31.981] Current Operating System: Linux samsara 4.4.6 #1-NixOS SMP Wed Mar 16 15:43:17 UTC 2016 x86_64
[ 31.981] Kernel command line: initrd=\efi\nixos\ly5hdqyk2yhb972dq4yzrrcz0rlgmhrj-initrd-initrd.efi systemConfig=/nix/store/45sibivic3b2wh1isx0ixn32ywisybzn-nixos-system-samsara-16.09pre79453.32b7b00 init=/nix/store/45sibivic3b2wh1isx0ixn32ywisybzn-nixos-system-samsara-16.09pre79453.32b7b00/init loglevel=4
[ 31.981] Build Date: 24 March 2016 05:38:17PM
[ 31.981]
[ 31.981] Current version of pixman: 0.34.0
{ config, pkgs, ... }:
{
# HFS+ kernel module. Probably loaded by default, but set here
# explicitly to be sure.
boot.kernelModules = [ "hfsplus" ];
# Bring bindfs into scope, which will be used to correct file permissions
# so that files and directories are accessible. This instead of using
# chmod or chown which will break the OS X install (dual boot).