Skip to content

Instantly share code, notes, and snippets.

View QuLogic's full-sized avatar

Elliott Sales de Andrade QuLogic

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@QuLogic
QuLogic / gist:eea6d576866297a72f4a
Last active February 20, 2016 05:56
ObsPy test warnings
======================================================================
ERROR: test_remove_polynomial_response (obspy.core.tests.test_trace.TraceTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/elliott/code/obspy/obspy/core/tests/test_trace.py", line 1662, in test_remove_polynomial_response
tr.remove_response()
File "<decorator-gen-39>", line 2, in remove_response
File "/home/elliott/code/obspy/obspy/core/trace.py", line 231, in _add_processing_info
result = func(*args, **kwargs)
File "/home/elliott/code/obspy/obspy/core/trace.py", line 2586, in remove_response
==13954== Invalid write of size 8
==13954== at 0xE122BD6: dealloc_QWidget (sipQtGuiQWidget.cpp:9393)
==13954== by 0x13496FC8: forgetObject (siplib.c:11399)
==13954== by 0x13498448: sipWrapper_dealloc (siplib.c:10962)
==13954== by 0x4EF5558: subtype_dealloc (typeobject.c:1226)
==13954== by 0x134983B4: sipWrapper_clear (siplib.c:10947)
==13954== by 0x13498450: sipWrapper_dealloc (siplib.c:10964)
==13954== by 0x4EF5558: subtype_dealloc (typeobject.c:1226)
==13954== by 0x4ED7E16: free_keys_object (dictobject.c:354)
==13954== by 0x4EDB388: dict_tp_clear (dictobject.c:2551)
--- libmseed.orig/test/Makefile 2016-10-08 01:42:04.339418308 -0400
+++ libmseed/test/Makefile 2016-10-08 01:48:56.889028948 -0400
@@ -41,13 +41,10 @@ $(BINS) : % : %.c
# Run test scripts, create %.test.out files and compare to %.test.ref references
$(TESTOUTS) : %.test.out : %.test $(BINS) FORCE
@$(eval TESTCOUNT=$(shell echo $$(($(TESTCOUNT)+1))))
- @$(shell ./$< > $@ 2>&1)
- @diff $<.ref $@ >/dev/null; \
- if [ $$? -eq 0 ]; \
- then printf '$(PASSED) Test $<\n'; \
@QuLogic
QuLogic / 2.0.0-blue.png
Last active May 14, 2017 02:00
Cartopy image clipping
2.0.0-blue.png
import numpy as np
def interp_coords(coords, tol):
'''
Interpolates extra coordinates when the euclidean distance between adjacent
points are larger than given tolerance.
The function tries to densify a list of coordinates based on a simple measure.
If two adjacent points in the input coordinate list are further away from each
other than the specified tolerance, the list will be densied between those two
points. Roughly speaking, a point will be inserted every `tol` between the
import matplotlib.pyplot as plt
from matplotlib.colors import Normalize
import numpy as np
import cartopy.crs as ccrs
import time
NROW = NCOL = 1
nlats, nlons = (241, 480)
Invalid read of size 4
at 0x2F8D9350: free_stages (alloc_fctns.c:638)
by 0x2F8D933F: free_stages (alloc_fctns.c:634)
by 0x2F8D933F: free_stages (alloc_fctns.c:634)
by 0x2F8D933F: free_stages (alloc_fctns.c:634)
by 0x2F8D933F: free_stages (alloc_fctns.c:634)
by 0x2F8D933F: free_stages (alloc_fctns.c:634)
by 0x2F8D942F: free_channel (alloc_fctns.c:681)
by 0x2F8E363D: evresp_itp (evresp.c:563)
by 0x2F8E3EF6: evresp (evresp.c:900)
# -*- coding: utf-8 -*-
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import matplotlib.pyplot as plt
import matplotlib.collections as mcollections
import matplotlib.patches as mpatches
import matplotlib.transforms as mtransforms