Skip to content

Instantly share code, notes, and snippets.

View MarneeDear's full-sized avatar
📻
You can't stop the signal.

Marnee Dearman (KG7SIO) MarneeDear

📻
You can't stop the signal.
View GitHub Profile
@MarneeDear
MarneeDear / gist:a158774079acd9ac12d6
Created April 26, 2015 23:46
Find out what other users are interested in
Find out what other users are interested in
match (u:USER {name:'Marnee'})-[ri:INTERESTED_IN]-(i:INTEREST {name:'Amateur Radio'})<-[r2:INTERESTED_IN]-(u2:USER)-[r3:INTERESTED_IN]->(i2:INTEREST)
return u, i, u2, i2
return only those that the user is not already interested in
match (u:USER {name:'Marnee'})-[ri:INTERESTED_IN]-(i:INTEREST {name:'Amateur Radio'})<-[r2:INTERESTED_IN]-(u2:USER)-[r3:INTERESTED_IN]->(i2:INTEREST)
where not (u)-[:INTERESTED_IN]->(i2)
return i2
@MarneeDear
MarneeDear / gist:c8d381364ec4d90c90c5
Created March 25, 2015 22:48
PARAMETERIZED DECORATOR validate json
__author__ = 'marnee'
import functools
from validators import validate_user_schema
def validate_json(object_type):
def _check_type(func):
def _validate(json_obj, *args, **kwargs):
# validate json
@MarneeDear
MarneeDear / gist:7b7f87dda8019f1d433f
Created March 25, 2015 22:23
DECORATOR Validate activate user json
__author__ = 'marnee'
import functools
from validators import validate_user_schema
def validate_json(func):
def _decorator(json_obj, *args, **kwargs):
# validate json
if validate_user_schema.validate_activate_user(json_obj):
return func(json_obj)

A small social networking website

This database is a small example of a networking site where users can watch movies, subscribe to TV shows and comment and rate any of the previous media. Users may follow or block other users, just like any other networking website nowadays.

  • Purpose:

The theme was chosen because of the success these type of webs have all over the world, and because in general their structure can easily and naturally be displayed as a graph with very different types of relationships and very connected data. So, in a nutshell,