Skip to content

Instantly share code, notes, and snippets.

from collections import namedtuple
import os
import pprint
import re
import requests
import shutil
import subprocess
import tarfile
import traceback
import zipfile
timfel /
Created July 7, 2022 09:27
Benchmark support for matplotlib and kiwi hpy ports
# ------------------------------------------------------------------------------
# Copyright (c) 2019, Nucleic Development Team.
# Distributed under the terms of the Modified BSD License.
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------------------------------------
"""Time updating an EditVariable in a set of constraints typical of enaml use.
View zerobrane-stratagus-plugin.lua
-- Start copy from spec/lua.lua
local unpack = table.unpack or unpack
local funcdef = "([A-Za-z_][A-Za-z0-9_%.%:]*)%s*"
local decindent = {
['else'] = true, ['elseif'] = true, ['until'] = true, ['end'] = true}
local incindent = {
['else'] = true, ['elseif'] = true, ['for'] = true, ['do'] = true,
['if'] = true, ['repeat'] = true, ['while'] = true}
local function isfndef(str)
timfel /
Created May 26, 2021 15:51
Supercharge Your Java Apps With Python Blogpost
Context context = Context.newBuilder("python").
option("python.ForceImportSite", "true").
option("python.Executable", VENV_EXECUTABLE).
timfel /
Created April 15, 2019 12:49 — forked from smarr/
Truffle: Languages and Material
View *scratch*.txt
"These to:do: loops are not message sends, and are compiled
into comparisons and jump bytecodes. The inner loop is jitted,
the outer isn't, but we get a bridge that executes from the end of the inner loop
over the jump to the beginning of the inner loop"
i := 0.
1 to: 2000 do: [:a |
1 to: 1000 do: [:b |
i := i + b abs.
[[MCMcmUpdater updateFromServer]
on: ProvideAnswerNotification
do: [:n | n resume: true]]
on: Warning
do: [:n | n resume: true].
[(Installer squeak
project: 'VMMaker')
install: 'VMMaker.oscog'] on: Warning do: [:n | n resume: true].
(Installer swasource
project: 'BenchmarkRunner')
timfel / hyperv-xterm.ps1
Created November 17, 2015 09:17
Switch to fastest connected interface to pipe Hyper-V network, trigger DHCP in VM, start Xming, connect via ssh, start xterm
View hyperv-xterm.ps1
function Ping-IPRange {
Ping-IPRange -StartAddress -EndAddress -Interval 20
[parameter(Mandatory = $true, Position = 0)]
View mechanize_doi_lookup.rb
require "mechanize"
url = ""
bibfile = ARGV[0]
outfile =[1], 'w') || STDOUT
puts "Searching for #{bibfile}, writing to #{outfile}"
agent =
page = agent.get url
View test2.plot
fontsize = 12
set term pdf
set style fill solid 1.00 border 0
set style histogram errorbars gap 2 lw 1
set style data histogram
set xtics rotate by -45
set grid ytics
set xlabel "Benchmarks"
set ylabel "Relative execution time vs. reference implementation"