Skip to content

Instantly share code, notes, and snippets.

@rigid
rigid / build.shell-session
Created October 20, 2019 13:23
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
@rigid
rigid / build.shell-session
Created October 20, 2019 12:18
code-eli tests
$ 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
[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
rigid / swiften-9999.ebuild
Created April 18, 2016 18:50
swiften live ebuild
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="4"
SCONS_MIN_VERSION="1.2"
LANGS=" ca de es fr hu nl pl ru se sk"
[[ ${PV} = *9999* ]] && VCS_ECLASS="git-2" || VCS_ECLASS=""
$ 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
rigid / gist:691eddb1e3c3b0aa7d3d
Created June 29, 2015 11:10
sequential check if single point is within polygon VS multipoint intersection with polygon
# ------------------------------------------------------------------------------
# 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
rigid / gist:5074630cecf3650354ec
Created June 26, 2015 18:32
"super class" that iterates through multiple iterateable subclasses
class A(object):
def __iter__(self):
# inits something
return self
def next(self):
return something
class B(object):
@rigid
rigid / gist:823d0b4036888f6f9ad2
Created May 13, 2015 23:41
QGIS 2.8.x install fail on linux mint
:: removed old version
# sudo apt-get autoremove --purge qgis
:: with deb http://qgis.org/debian jessie main
:: update
# sudo apt-get update
Exception in thread Thread-15:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 763, in run
self.__target(*self.__args, **self.__kwargs)
File "./util/threaded_csv.py", line 82, in worker
writer.writerows(result_row)
ValueError: I/O operation on closed file
@rigid
rigid / gist:10dd4dbbd546134a4268
Last active August 29, 2015 14:20
Random hangs that can't be interrupted by Ctrl+C (not even in pdb)
#!/usr/bin/python
import sys
import csv
import Queue
import threading
max_threads = 30
# input CSV