This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In [87]: re.compile(r'[A-Z]{2,}(?:\s+[A-Z]{2,})+', re.DEBUG) | |
max_repeat 2 65535 | |
in | |
range (65, 90) | |
max_repeat 1 65535 | |
subpattern None | |
max_repeat 1 65535 | |
in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import direct.directbase.DirectStart | |
from panda3d.core import * | |
vertex = ''' | |
#version 330 | |
in vec4 p3d_Vertex; | |
in vec2 p3d_MultiTexCoord0; | |
uniform mat4 p3d_ModelViewProjectionMatrix; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import direct.directbase.DirectStart | |
from direct.gui.OnscreenText import OnscreenText | |
from panda3d.core import * | |
loadPrcFileData("", "dump-generated-shaders 1") | |
base.setBackgroundColor(0.5, 0.5, 0.5) | |
t = OnscreenText(text='asdallaskjf', scale=0.5) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class A(object): | |
def x(self): | |
return self.x.y | |
x.y = 123 | |
class B(object): | |
def x(self): | |
return B.x.y | |
x.y = 123 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class A(object): | |
def x(cls): | |
return cls.x.y | |
x.y = 123 | |
x = classmethod(x) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def bitap_search(text, pattern): | |
""" | |
Returns position of pattern in text or -1 if it wasn't found. | |
text and pattern are strings. | |
>>> bitap_search("test text", "tex") | |
5 | |
>>> bitap_search("test text", "z") | |
-1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
class Point(): | |
__slots__ = ('x', 'y') | |
def __init__(self, x, y): | |
self.x = x | |
self.y = y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//global | |
"ZreknarF":["cdn.frankerfacez.com/channel/global/ZreknarF.png"], | |
"LilZ":["cdn.frankerfacez.com/channel/global/LilZ.png"], | |
"BeanieHipster":["cdn.frankerfacez.com/channel/global/BeanieHipster.png"], | |
"ManChicken":["cdn.frankerfacez.com/channel/global/ManChicken.png"], | |
"YellowFever":["cdn.frankerfacez.com/channel/global/YellowFever.png"], | |
"YooHoo":["cdn.frankerfacez.com/channel/global/YooHoo.png"], | |
//00greenbean00 | |
"BeanAhab":["cdn.frankerfacez.com/channel/00greenbean00/BeanAhab.png"], | |
"BeanHori":["cdn.frankerfacez.com/channel/00greenbean00/BeanHori.png"], |
NewerOlder