Skip to content

Instantly share code, notes, and snippets.

rigid /
Created Oct 20, 2019
code-eli tests (verbose)
$ VERBOSE=1 make
/usr/bin/cmake -S/var/tmp/portage/sci-libs/code-eli-9999/work/code-eli-9999 -B/var/tmp/portage/sci-libs/code-eli-9999/work/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /var/tmp/portage/sci-libs/code-eli-9999/work/build/CMakeFiles /var/tmp/portage/sci-libs/code-eli-9999/work/build/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/var/tmp/portage/sci-libs/code-eli-9999/work/build'
make -f example/airfoil_fit/CMakeFiles/AirfoilFitExample.dir/build.make example/airfoil_fit/CMakeFiles/AirfoilFitExample.dir/depend
make -f example/vsp_pod/CMakeFiles/VSPPodExample.dir/build.make example/vsp_pod/CMakeFiles/VSPPodExample.dir/depend
make -f test/constants/CMakeFiles/ConstantsMathTest.dir/build.make test/constants/CMakeFiles/ConstantsMathTest.dir/depend
make[2]: Entering directory '/var/tmp/portage/sci-libs/code-eli-9999/work/build'
cd /var/tmp/portage/sci-libs/code-eli-9999/work/build && /usr/bin/cmake -E cmake_depen
$ make
Scanning dependencies of target ConstantsMathTest
Scanning dependencies of target VSPPodExample
Scanning dependencies of target ADTest
Scanning dependencies of target AirfoilFitExample
Scanning dependencies of target DMTest
[ 3%] Building CXX object example/vsp_pod/CMakeFiles/VSPPodExample.dir/vsp_pod.cpp.o
[ 3%] Building CXX object test/constants/CMakeFiles/ConstantsMathTest.dir/constants_math_test.cpp.o
[ 5%] Building CXX object test/mutil/ad/CMakeFiles/ADTest.dir/ad_test.cpp.o
[ 7%] Building CXX object example/airfoil_fit/CMakeFiles/AirfoilFitExample.dir/airfoil_fit.cpp.o
View gist:5195ed5102bdaa42b383bb5619ef9406
[daniel:~/code … 66/mine/irrigator/readline-6.3/build] $ LC_ALL="C" CFLAGS="-mlongcalls" LDFLAGS="-nostdlib -Wl,--start-group -lmain -lnet80211 -lwpa -llwip -lpp -lphy -Wl,--end-group -lgcc" ../configure --host=xtensa-lx106-elf --disable-largefile --disable-shared --disable-multibyte --without-curses --without-purify
checking build system type... x86_64-unknown-linux-gnu
checking host system type... xtensa-lx106-elf
Beginning configuration for readline-6.3 for xtensa-lx106-elf
checking whether make sets $(MAKE)... yes
checking for xtensa-lx106-elf-gcc... xtensa-lx106-elf-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
rigid / swiften-9999.ebuild
Created Apr 18, 2016
swiften live ebuild
View swiften-9999.ebuild
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
LANGS=" ca de es fr hu nl pl ru se sk"
[[ ${PV} = *9999* ]] && VCS_ECLASS="git-2" || VCS_ECLASS=""
View gist:0e65f7deca2ce5f8fbd9
$ hackrf_transfer -r foo.wav
call hackrf_sample_rate_set(10000000 Hz/10.000 MHz)
call hackrf_baseband_filter_bandwidth_set(9000000 Hz/9.000 MHz)
call hackrf_set_freq(900000000 Hz/900.000 MHz)
Stop with Ctrl-C
0.3 MiB / 1.000 sec = 0.3 MiB/second
User cancel, exiting...
Total time: 1.00010 s
hackrf_stop_rx() done
rigid / gist:691eddb1e3c3b0aa7d3d
Created Jun 29, 2015
sequential check if single point is within polygon VS multipoint intersection with polygon
View gist:691eddb1e3c3b0aa7d3d
# ------------------------------------------------------------------------------
# this works fine (finds correct amount of objects within an area)
# walk all areas
for area in areas:
polygon = ogr.CreateGeometryFromWkt(area.polygon)
within_count = 0
# walk all objects
for obj in all_objects:
rigid / gist:5074630cecf3650354ec
Created Jun 26, 2015
"super class" that iterates through multiple iterateable subclasses
View gist:5074630cecf3650354ec
class A(object):
def __iter__(self):
# inits something
return self
def next(self):
return something
class B(object):
rigid / gist:823d0b4036888f6f9ad2
Created May 13, 2015
QGIS 2.8.x install fail on linux mint
View gist:823d0b4036888f6f9ad2
:: removed old version
# sudo apt-get autoremove --purge qgis
:: with deb jessie main
:: update
# sudo apt-get update
View gist:1e1ef0d5be4270ca9655
Exception in thread Thread-15:
Traceback (most recent call last):
File "/usr/lib/python2.7/", line 810, in __bootstrap_inner
File "/usr/lib/python2.7/", line 763, in run
self.__target(*self.__args, **self.__kwargs)
File "./util/", line 82, in worker
ValueError: I/O operation on closed file
rigid / gist:10dd4dbbd546134a4268
Last active Aug 29, 2015
Random hangs that can't be interrupted by Ctrl+C (not even in pdb)
View gist:10dd4dbbd546134a4268
import sys
import csv
import Queue
import threading
max_threads = 30
# input CSV