Skip to content

Instantly share code, notes, and snippets.

View RobertKrajewski's full-sized avatar

Robert Krajewski RobertKrajewski

View GitHub Profile
@Rolias
Rolias / PropertyHelper.h
Last active September 27, 2023 21:58
Qt Auto Property Macros
#pragma once
#include <QObject>
//See Gist Comment for description, usage, warnings and license information
#define AUTO_PROPERTY(TYPE, NAME) \
Q_PROPERTY(TYPE NAME READ NAME WRITE NAME NOTIFY NAME ## Changed ) \
public: \
TYPE NAME() const { return a_ ## NAME ; } \
void NAME(TYPE value) { \
if (a_ ## NAME == value) return; \
a_ ## NAME = value; \
@bsweger
bsweger / useful_pandas_snippets.md
Last active April 19, 2024 18:04
Useful Pandas Snippets

Useful Pandas Snippets

A personal diary of DataFrame munging over the years.

Data Types and Conversion

Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)