Skip to content

Instantly share code, notes, and snippets.

View timfel's full-sized avatar
👨‍🍼
Parental leave through 2024

Tim Felgentreff timfel

👨‍🍼
Parental leave through 2024
View GitHub Profile
@timfel
timfel / Context.java
Last active May 5, 2023 12:08
Supercharge Your Java Apps With Python Blogpost
Context context = Context.newBuilder("python").
allowAllAccess(true).
option("python.ForceImportSite", "true").
option("python.Executable", VENV_EXECUTABLE).
build();
from collections import namedtuple
import os
import pprint
import re
import requests
import shutil
import subprocess
import tarfile
import traceback
import zipfile
@timfel
timfel / enaml_like_benchmark.py
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.
"""
-- 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
timfel / truffle-material.md
Created April 15, 2019 12:49 — forked from smarr/truffle-material.md
Truffle: Languages and Material
"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')
[translation:ERROR] Error:
[translation:ERROR] Traceback (most recent call last):
[translation:ERROR] File "/home/tim/dev/pypy/rpython/translator/goal/translate.py", line 321, in main
[translation:ERROR] drv.proceed(goals)
[translation:ERROR] File "/home/tim/dev/pypy/rpython/translator/driver.py", line 732, in proceed
[translation:ERROR] return self._execute(goals, task_skip = self._maybe_skip())
[translation:ERROR] File "/home/tim/dev/pypy/rpython/translator/tool/taskengine.py", line 114, in _execute
[translation:ERROR] res = self._do(goal, taskcallable, *args, **kwds)
[translation:ERROR] File "/home/tim/dev/pypy/rpython/translator/driver.py", line 283, in _do
[translation:ERROR] res = func()
import os
import requests
build_name = os.environ['filename']
f = open(build_name, "rb")
response = requests.post('http://www.topazruby.com/builds/create/', {
'build_secret': os.environ['BUILD_SECRET'],
'sha1': os.environ['sha1'],
'platform': 'windows32',
'success': 'true',
}, files={'build': (build_name, f)})
@timfel
timfel / gist:5481905
Created April 29, 2013 14:26
failures on ubuntu precise 32bit
Started by upstream project "ha:AAAAmR+LCAAAAAAAAABb85aBtbiIQTGjNKU4P08vOT+vOD8nVc83PyU1x6OyILUoJzMv2y+/JJUBAhiZGBgqihhk0NSjKDWzXb3RdlLBUSYGJk8GtpzUvPSSDB8G5tKinBIGIZ+sxLJE/ZzEvHT94JKizLx0a6BxUmjGOUNodHsLgAz2EgZe/az8JP2Q/ILEKmMjfQCcHZdXwgAAAA==Topaz32" build number ha:AAAAmx+LCAAAAAAAAABb85aBtbiIQTGjNKU4P08vOT+vOD8nVc83PyU1x6OyILUoJzMv2y+/JJUBAhiZGBgqihhk0NSjKDWzXb3RdlLBUSYGJk8GtpzUvPSSDB8G5tKinBIGIZ+sxLJE/ZzEvHT94JKizLx0a6BxUmjGOUNodHsLgAymEgZ+/az8JP2Q/ILEKmMjfSNLAAeYdPTEAAAA29
originally caused by:
Started by timer
[EnvInject] - Loading node environment variables.
Building remotely on Precise32 in workspace /home/vagrant/workspace/Topaz32/TEST_TYPE/own/label/Precise32
Checkout:Precise32 / /home/vagrant/workspace/Topaz32/TEST_TYPE/own/label/Precise32 - hudson.remoting.Channel@60be9782:Precise32
Using strategy: Default
Last Built Revision: Revision 1363b8df311f1fe703259143fa4d3074ac1ae2c2 (origin/master)
Cloning the remote Git repository
Cloning repository git://github.com/topazproject/topaz.