Skip to content

Instantly share code, notes, and snippets.

View jeyziel's full-sized avatar

jeyziel gama jeyziel

View GitHub Profile
@alexserver
alexserver / rest-basics.md
Created October 28, 2015 18:56
REST basics, Theory, Principles, and examples.

RESTful API know-how

Motivation

I place my learning process in this document with 2 motives:

  1. To have a quick guide whenever I lost the track of knowledge.
  2. To share the knowledge with anyone wants to learn RESTful APIs

1. Before, some theory

@jwage
jwage / Cartesian.php
Created April 22, 2014 20:30
PHP Cartesian Function
<?php
$attributeValues = array(
'color' => array('Red', 'White', 'Blue'),
'size' => array(1, 2, 3, 4),
'fabric' => array('Cloth', 'Silk')
);
class Cartesian
{
@abhin4v
abhin4v / maximal_cliques.py
Last active October 7, 2021 16:46
Finds all maximal cliques in a graph using the Bron-Kerbosch algorithm
# Finds all maximal cliques in a graph using the Bron-Kerbosch algorithm. The input graph here is
# in the adjacency list format, a dict with vertexes as keys and lists of their neighbors as values.
# https://en.wikipedia.org/wiki/Bron-Kerbosch_algorithm
from collections import defaultdict
def find_cliques(graph):
p = set(graph.keys())
r = set()
x = set()