Skip to content

Instantly share code, notes, and snippets.

View adryanf's full-sized avatar
🎯
Focusing

Adrian-Gabriel Furculita adryanf

🎯
Focusing
View GitHub Profile
@adryanf
adryanf / numberOfValidParenthesesCombinationsOfN.js
Last active May 10, 2019 18:11
Number of valid parentheses combinations
//inefficient O(n^2)
// Improvement Ideas
// The binary numbers must be balanced - equal number of 0s and 1s - maybe there's an efficient way to find out these numbers
//
function getNumberOfValidParenthesesCombinationsOfN(n){
var i;
@adryanf
adryanf / app.py
Last active January 3, 2019 12:42
Call celery task chain from flask app using celery task signatures
from flask import Flask, request
from celery import Celer
celery = Celery('sample', backend='rpc://', broker='amqp://guest@localhost//')
app = Flask('sample_api')
upercase = celery.signature('sample.uppercaseme')
lowercase = celery.signature('sample.lowercaseme')