Skip to content

Instantly share code, notes, and snippets.

View Jolly23's full-sized avatar
🎯
Focusing

Mars Jolly23

🎯
Focusing
  • University of Southern California
  • Los Angeles, CA
View GitHub Profile
@Jolly23
Jolly23 / rma.py
Created January 18, 2019 08:05
A stable roommate problem with 4 students a, b, c, d is defined as follows. Each student ranks the other three in strict order of preference. A match- 1 2. ing is defined as the separation of the students into two disjoint pairs. A matching is stable if no two separated students prefer each other to their current roommates. Does a stable matchin…
# -*- coding: utf-8 -*-
from itertools import combinations, permutations, product
def matching(stu_pre):
m = {}
s = {}
already_matched = []
not_match_pairs = []
match = []
@Jolly23
Jolly23 / cx_oracle.md
Created May 7, 2016 10:27 — forked from kimus/cx_oracle.md
Installing python cx_oracle on Ubuntu

First of all, it just seems like doing anything with Oracle is obnoxiously painful for no good reason. It's the nature of the beast I suppose. cx_oracle is a python module that allows you to connect to an Oracle Database and issue queries, inserts, updates..usual jazz.

Linux

Step 1:

sudo apt-get install build-essential unzip python-dev libaio-dev

Step 2. Click here to download the appropriate zip files required for this. You'll need: