Skip to content

Instantly share code, notes, and snippets.

View szabi's full-sized avatar

André Szabolcs Szelp szabi

  • Vienna, Austria
View GitHub Profile
@szabi
szabi / example.cmd
Created March 14, 2023 17:36
Accompanying tox issue
REM With single envs it works as expected:
REM expecting: nothing printed, no FAIL
tox -q run -e py310-ok & if ERRORLEVEL 1 echo FAIL
REM (OK) expectation met.
REM expecting FAIL:
tox -q run -e py310-fail & if ERRORLEVEL 1 echo FAIL
REM (OK) expectation met.
@szabi
szabi / Angle.hs
Last active May 12, 2020 14:23
Could not deduce <instance> arising from...
module Angle where
{- | Type-class for angle units.
This library provides @Rad@ (radians) and @Deg@ (degrees), but you could
define e.g. Gon. The instance definition takes the value of a turn.
-}
class Angle a where
-- how many UNITS does a whole turn have?
turn :: Floating x => a x
-- normalizes the angle
@szabi
szabi / lit_models.py
Last active December 18, 2015 15:18
This is the strange situation described in http://stackoverflow.com/questions/17126274/objects-get-does-not-work-as-expected . See file `output` including its comments to have the extremely confusing behaviour demonstrated. See the Gist notes for version information and further explanation.
# from uuslug import uuslug
from neo4django.db import models
from neo4django.auth.models import User
# Create your models here.
class Category(models.NodeModel):
name = models.StringProperty(unique=True, indexed=True)
url_name = models.StringProperty(unique=True, indexed=True)
description = models.StringProperty()