Skip to content

Instantly share code, notes, and snippets.

View simplexityx's full-sized avatar

Simplexityx simplexityx

View GitHub Profile
struct node{
node_t *lchild;
node_t *rchild;
node_t *parent;
int left;
int right;
int height;
int visited;
#include "set.h"
#include <stdio.h>
#include <stdlib.h>
static int compare_ints(void *a, void *b)
{
int *ia = a;
int *ib = b;
return (*ia)-(*ib);
}
#include <stdio.h>
#include <stdlib.h>
#include "set.h"
#include <assert.h>
#include <sys/time.h>
typedef struct set_iter set_iter_t;
typedef struct set set_t;
typedef struct node node_t;
typedef struct stck stck_t;
set_t *set_intersection(set_t *a, set_t *b){
set_t *nyttsett=set_create(a->cmpfunc);
set_iter_t * iterA, *iterB;
iterA=set_createiter(a);
iterB=set_createiter(b);
void *aa;
void *bb;
aa=set_next(iterA);
#!/usr/bin/env python
""" Pre-code for INF-1400
16 January 2017 Revision 3 (Mads Johansen):
Rewritten to conform to Python 3 standard. Made class iterable, added property as_point,
replaced magnitude with __abs__ (to reflect mathematical vector notation), added rotate method.
22 January 2012 Revision 2 (Martin Ernstsen):
Reraise exception after showing error message.
11 February 2011 Revision 1 (Martin Ernstsen):
Fixed bug in intersect_circle. Updated docstrings to Python standard.
SCREENX = 800
SCREENY = 600
SPACESHIPSIZE = 10
LIMIT = 3
GRAVITY = 0.2
@simplexityx
simplexityx / CONFIG.py
Last active March 16, 2017 21:40
stuff
SCREENX = 800
SCREENY = 600
SPACESHIPSIZE = 10
LIMIT = 3
GRAVITY = 0.2
#include "set.h"
#include "list.h"
#include <assert.h>
#include <stdlib.h>
#define DEBUG_CHECKSET 0
struct treenode;
typedef struct treenode treenode_t;
#include "index.h"
#include "common.h"
#include "map.h"
#include "set.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct index index_t;
struct index {
map_t *map;
#include "index.h"
#include "common.h"
#include "map.h"
#include "set.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
double updatescore(set_t *set ,void *value);
set_t *syntax(index_t *index, set_t *set, list_iter_t *iter);