Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Mehmet Sefa mehmetsefabalik

Block or report user

Report or block mehmetsefabalik

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View log_on_exception.py
def log_on_exception(tag1, tag2):
def deco(func):
def wrapper(*args, **kwargs):
try:
result = func(*args, **kwargs)
except exception as err:
logger(err, tag1, tag2)
else:
return result
return wrapper
@mehmetsefabalik
mehmetsefabalik / jsGenerators.js
Created Jul 24, 2018
Javascript Generators and Iterators
View jsGenerators.js
// Iterators
const alpha = ['a','b','c'];
const it = alpha[Symbol.iterator]();
it.next(); //{ value: 'a', done: false }
it.next(); //{ value: 'b', done: false }
it.next(); //{ value: 'c', done: false }
it.next(); //{ value: undefined, done: true }
// Generate Fibonacci Sequence using Generator Function
You can’t perform that action at this time.