Skip to content

Instantly share code, notes, and snippets.

@ppkt
ppkt / once.py
Created September 13, 2019 11:15
class MyClass():
def __init__(self):
self._executed = False
def run_once(self):
if self._executed:
return
print('Running')
self._executed = True
THE WITCHER 3: WILD HUNT LEGAL RULES
Last updated: 03.04.2015
Hello and thanks for your interest in The Witcher 3: Wild Hunt! These are the legal rules which we ask you to follow if you download, install or play it.
(1) LEGAL STUFF ABOUT THESE RULES
Summary: This is a legal agreement between you, dear gamer, and us, i.e. CD PROJEKT RED, regarding The Witcher 3: Wild Hunt. We’ve included here a short, informal summary of each of these Rules (though it’s the full version which is legally binding).
These ‘Rules’ are a legally binding contract between you and CD PROJEKT S.A. ul. Jagiellonska 74; 03-301, Warsaw, Poland (we will further call ourselves “CD Projekt Red”) regarding your use of The Witcher 3: Wild Hunt. IMPORTANT: please also read our CD PROJEKT RED User Agreement (http://bar.cdprojektred.com/regulations/) which sets out the basic legal rules for all our games and services, including this game. Our Privacy Policy (http://bar.cdprojektred.com/regulations/#cookies) protects any personal information
>>> import sys
>>> sys.getsizeof(123)
24
>>> sys.getsizeof(123123123123)
24
>>> sys.getsizeof(123123123123123123123)
36
>>> sys.getsizeof(123123123123123123123123123)
36
>>> sys.getsizeof(12312312312312312312312312312312312312)
Another user rings.
"I need more space" he says
"Well, why not move to Texas?" I ask
"No, on my account, stupid."
Stupid? Uh-Oh.
@ppkt
ppkt / django_pycharm.py
Last active May 11, 2016 10:29 — forked from croepha/django_pycharm.py
This will activate an attached PyCharm or PyDev debugger on a django 500 error
# This will activate an attached PyCharm or PyDev debugger on a django 500
# error
# This makes it so that you dont have to set a breakpoint
# To use this, run the project in PyCharm or PyDev in debug mode, paste
# or import this code somewhere ( i usually just paste it in urls.py )
# inspired by these:
# https://github.com/jlubcke/pytest-pycharm/blob/master/pytest_pycharm.py
print(wifi.sta.getip())
dht_pin = 2; -- IO4
sda_pin = 5;
scl_pin = 6;
bmp180 = require("bmp180_2")
bmp180.init(sda_pin, scl_pin)