Skip to content

Instantly share code, notes, and snippets.

View anossov's full-sized avatar

Pavel Anossov anossov

View GitHub Profile
In [1]: l1 = [[[0]*3]*3]*3
In [2]: l1
Out[2]:
[[[0, 0, 0], [0, 0, 0], [0, 0, 0]],
[[0, 0, 0], [0, 0, 0], [0, 0, 0]],
[[0, 0, 0], [0, 0, 0], [0, 0, 0]]]
In [3]: l1[0][0][0] = 'x'
#include <GL3/gl3w.h>
#include <GL/glfw.h>
#include <iostream>
#include <string>
#include <vector>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
@anossov
anossov / cave.py
Created November 14, 2012 07:51
Cave generator rewrite
import random
class Point():
__slots__ = ('x', 'y')
def __init__(self, x, y):
self.x = x
self.y = y