Skip to content

Instantly share code, notes, and snippets.

View sahas-'s full-sized avatar

Sahas sahas-

  • Chicago, IL
View GitHub Profile
'use strict';
var Q = require('q');
function test(){
var _test = Q.all([getPromise(1),getPromise(2),getPromise(3)]);
_test.spread(function(one,two,three){
console.log("one.."+one);
console.log("two.."+two);
console.log("three.."+three);
var queue = require('queue');
var input = [1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13];
var q = queue();
q.concurrency = 1;
function test(element) {
return (function (cb) {
setTimeout(function() {
console.log(element);
cb();
@sahas-
sahas- / Python getter_setter
Created June 14, 2017 21:22
Python getter_setter
class Employee(object):
def __init__(self,obj):
self.__set_employee(obj)
def __get_employee(self):
return self.__employee
def __set_employee(self,employee):
self.__employee = employee
@sahas-
sahas- / launch.json
Created June 14, 2017 21:31
Python debug in vscode
{
"version": "0.2.0",
"configurations": [
{
"name": "Python",
"type": "python",
"request": "launch",
"stopOnEntry": true,
"pythonPath": "/usr/local/bin/python3",
"program": "${file}",
@sahas-
sahas- / what-is-a-cell.md
Last active April 7, 2024 14:03
In Cell-Based Architecture, what is a Cell?

What is a Cell

A Cell

  • Is a module that aggregates business capabilities and manages their internal intricacies.

  • Is a self-contained unit that groups functionalities together based on business capabilities into a single cohesive unit.

  • Might internally use sub-components to achieve the complex business tasks but these components wouldn’t be separately deployable.

  • Has clear and well-established boundaries that define its area of responsibility, data ownership and exposes explicit interfaces. Can leverage various communication mechanisms such as APIs, events and messages.