Skip to content

Instantly share code, notes, and snippets.

View thasti's full-sized avatar

Stefan Biereigel thasti

View GitHub Profile
@thasti
thasti / bench.py
Created February 17, 2020 22:29
Exception vs instance checking
class TestClass:
def testmethod(self):
return 5, 3
def test(a):
try:
meth = a.testmethod
except AttributeError:
return a, 3
else:
@thasti
thasti / gist:4f529f0a080e5ac600f5888aba4474de
Created May 20, 2019 20:24
yosys-git libyosys/pyosys build
--- PKGBUILD.bak 2019-05-20 20:46:58.586996105 +0200
+++ PKGBUILD 2019-05-20 20:47:47.537025623 +0200
@@ -25,6 +25,8 @@
cd ${srcdir}/yosys
mv ../abc ./
make config-gcc
+ echo "ENABLE_LIBYOSYS=1" >> Makefile.conf
+ echo "ENABLE_PYOSYS=1" >> Makefile.conf
make
}