Skip to content

Instantly share code, notes, and snippets.

Avatar

Encolpe DEGOUTE encolpe

View GitHub Profile
@encolpe
encolpe / paginate.py
Created Dec 26, 2018
Pagination tests
View paginate.py
import math
TEST_DATA = [
{
'total': 7,
'range': 3,
'orphan': 1,
'have_orphan': True,
'nb_pages': 2,
View gist:876d0d3911dd788e71bf53598b6ac5ce
### Keybase proof
I hereby claim:
* I am encolpe on github.
* I am encolpe (https://keybase.io/encolpe) on keybase.
* I have a public key ASCcPbfhm3qTVJ4rNOsVswGxPS10VSauslu0kyVdTmDJvgo
To claim this, I am signing this object:
@encolpe
encolpe / python_wat.py
Created Jan 5, 2017
What happen if you're append a list to itself in python?
View python_wat.py
#!/bin/python
a = [1, 1, 1]
b = a
print(b)
b.append(a)
print(b)
print(b[-1])
print(b[-1][-1])
c = b