Skip to content

Instantly share code, notes, and snippets.

View VitorRamos's full-sized avatar

Vitor Ramos VitorRamos

View GitHub Profile
def getTotalX(a, b):
#x%a[i]==0 x>=a[i]
#b[i]%x==0 x<=b[i]
#max(a[i])<=x<=min(b[i])
cnt= 0
for x in range(max(a), min(b)+1):
for va in a:
if x%va != 0: break
else:
from OpenGL.GLUT import *
from OpenGL.GL import *
from OpenGL.GLU import *
from collections import defaultdict
class vec2:
def __init__(self,x,y):
self.x=x
self.y=y
@VitorRamos
VitorRamos / C++ definitions
Last active November 27, 2018 13:02
Swig simple example
#include "myclass.h"
int myclass::get_x()
{
return x;
}
void myclass::set_x(int v)
{
x= v;