Skip to content

Instantly share code, notes, and snippets.

From: Jeremy Sanders <jeremy@jeremysanders.net>
Subject: Fix test on i386 and other platforms without numpy.float128
Index: debian-iminuit/tests/test_cost.py
===================================================================
--- debian-iminuit.orig/tests/test_cost.py
+++ debian-iminuit/tests/test_cost.py
@@ -709,7 +709,7 @@ def test_NormalConstraint_properties():
assert_equal(nc.covariance, (1, 2))
@jeremysanders
jeremysanders / rotated-text-example.py
Created October 11, 2021 18:06
example program with rotated text
#!/usr/bin/env python3
import sys
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
class Win(QWidget):
def paintEvent(self, event):
#include <xsTypes.h>
#include <XSFunctions/Utilities/FunctionUtility.h>
#include <XSUtil/Utils/XSstream.h>
#include <XSstreams.h>
#include <cmath>
#include <iostream>
#include <cstdlib>
#include <sstream>
#include <valarray>
@jeremysanders
jeremysanders / constlast.patch
Created June 4, 2018 19:21
patch to rename constLast to last
diff --git a/veusz/helpers/src/qtloops/polylineclip.cpp b/veusz/helpers/src/qtloops/polylineclip.cpp
index ae5b8edb..3cfe5fbe 100644
--- a/veusz/helpers/src/qtloops/polylineclip.cpp
+++ b/veusz/helpers/src/qtloops/polylineclip.cpp
@@ -382,7 +382,7 @@ bool doPolygonsIntersect(const QPolygonF& a, const QPolygonF& b)
{
for(auto const& poly : {a, b})
{
- QPointF prevpt(poly.constLast());
+ QPointF prevpt(poly.last());