This function is way more verbose than needed on purpose The logic is not easy to understand when done as a one-liner Returns the gas price in wei
557209
function getGasPrice(toWei) {
  return axios.get("https://ethgasstation.info/json/ethgasAPI.json").then(response => {
    //ethgasstation returns 10x the actual average for some odd reason
    let actualAverage = response.data.average / 10
    winston.debug(`gas price actualAverage: ${actualAverage}`)

    //We want to just add a bit more than average to be speedy
    let safeAmount = actualAverage + 0.1
    winston.debug(`gas price safeAmount: ${safeAmount}`)

    //We want to round to the tenthousandth precision
    let rounded = Math.round(safeAmount * 10000) / 10000
    winston.debug(`gas price rounded: ${rounded}`)

    //Lets save the gas price in wei, rather than gwei, since that is how web3 expects it.
    let wei = toWei(`${rounded}`, 'gwei')
    winston.debug(`gas price wei: ${wei}`)

    return parseInt(wei)
  })
}
699832
function log( func, msg ){
  var logline = '['+func+'] '+msg;

  if ( logInfo ) {
    if ( logInfoStr == '' ) {
      console.log( logline );      
    } else if ( logInfoStr.indexOf( func ) >= 0 ) { 
      console.log( logline );
    }
  }

  // send log to event broker
  if ( loggerEvents ) { 
    var logBroker = getEventBroker('log');
    logBroker.cleanupQueue( 1000 );
    logBroker.queueEvent( { text: logline, channel:'log' } );
  }
  
}
1140335
function toSource$1(func) {
  if (func != null) {
    try {
      return funcToString$1.call(func);
    } catch (e) {}
    try {
      return func + '';
    } catch (e) {}
  }
  return '';
}
934422
function step1c$1(token) {
                var r1 = getR1(token);

                if (!r1) {
                    return token;
                }

                if (r1.match(/(erte|ert)$/)) {
                    return token.replace(/(erte|ert)$/, 'er');
                }

                return token;
            }
1354945
def increase_verbosity():
    
    defined_levels = sorted(set(find_defined_levels().values()))
    current_index = defined_levels.index(get_level())
    selected_index = max(0, current_index - 1)
    set_level(defined_levels[selected_index])
299118
function (fn, scope) {
        return function () {
            try {
                return fn.apply(scope, arguments);
            }
            catch (ex) {
                logger.error(ex);
                logger.error(ex.stack);
                logger.log('error bubbled up ' + ex);
            }
        };
    }
606533
function( type ) {
  return function() {
    if ( type !== 'Extra: ' || logger.verbose ) {
      var args = type ? [].concat.apply( [], [ type, arguments ] ) : arguments;
      console.log.apply( console, args );
    }
  };
}
875797
def with_output(verbosity=1):
    
    def make_wrapper(func):
        @wraps(func)
        def wrapper(*args, **kwargs):
            configure_output(verbosity=verbosity)
            return func(*args, **kwargs)
        return wrapper
    return make_wrapper
637117
function(fn)
    {
        return this.execute().then(function(res) {
            return _(res).reduce(function(acc, x) {
                return acc + (0|fn(x));
            }, 0);
        });
    }
477339
function (fn, module, data, verbose) {

        let complete = module.toUpperCase() + " > ";

            // Only provide verbose log if logLevel > 5
            verbose = config.logLevel >= 5 ? (verbose || undefined) : undefined;

        // When writing to console
        if ( config.destination === console) {

            // Compose message
            complete = " [ " + new Date().toLocaleString() + " ] " + complete + data;

            if ( fn == "error" ) 
                complete = complete.bgRed.white;
            else if ( fn == "warning" )
                complete = complete.bgYellow.black

        // ... when writing to a custom log function
        } else {
            complete += fn + ': ' + data;

        }

        // Check that destination.fn exists, fallback to destination.log
        let logger = (config.destination[fn] || config.destination.log).bind(config.destination);

        if ( verbose !== undefined ) {
            logger(complete, verbose);    
        } else {
            logger(complete);
        }
        
        
    }
1127687
function quote(inst, list, argv, event, fin) {
    // Remember to charge for the 'quote' function as a transaction
    if (!ok(inst, inst.options.quoteTransaction)) return exit(inst, list, fin);
    var entity = list[list.length - 1];
    if (_isValue(entity)) return fin(null, entity);
    var quotation = {};
    quotation[RUNIQ_QUOTED_ENTITY_PROP_NAME] = entity;
    return fin(null, quotation);
}
1138727
def verbosity():
    
    ctx = click.get_current_context()
    state = ctx.ensure_object(CommandState)
    return state.verbosity
1291911
function makeCo(Sequelize) {
	const co = Sequelize.Promise.coroutine;

	function coAll(obj) {
		_.forIn(obj, (value, key) => {
			if (isGeneratorFunction(value)) obj[key] = co(value);
		});
		return obj;
	}

	return {co, coAll};
}
1105462
def verbose(self, msg, *args, **kw):
        """"""
        if self.isEnabledFor(VERBOSE):
            self._log(VERBOSE, msg, args, **kw)
1299506
function(parts, falsy, scoped) {
                /*jshint -W083 */
                var i = 0,
                    len = parts.length;

                if (!scoped && this.options.compat && !this.lastContext) {
                    // The depthed query is expected to handle the undefined logic for the root level that
                    // is implemented below, so we evaluate that directly in compat mode
                    this.push(this.depthedLookup(parts[i++]));
                } else {
                    this.pushContext();
                }

                for (; i < len; i++) {
                    this.replaceStack(function(current) {
                        var lookup = this.nameLookup(current, parts[i], 'context');
                        // We want to ensure that zero and false are handled properly if the context (falsy flag)
                        // needs to have the special handling for these values.
                        if (!falsy) {
                            return ' != null ? ' + lookup + ' : ' + current;
                        } else {
                            // Otherwise we can use generic falsy handling
                            return ' && ' + lookup;
                        }
                    });
                }
            }
1179824
function makeSortby(/* fields ...*/) {
	var aFields = Array.prototype.slice.apply(arguments),
		aNorms = [],
		aFuncs = [];
	for (var i = 0; i < arguments.length; i++) {
		aNorms[i] = 1;
		if ( typeof aFields[i] === 'function' ) {
			aFuncs[i] = aFields[i];
			continue;
		}
		aFuncs[i] = function($,n) { return $[n]; };
		if ( aFields[i].indexOf("!") === 0 ) {
			aNorms[i] = -1;
			aFields[i] = aFields[i].slice(1);
		}
		if ( aFields[i] === 'deprecated' ) {
			aFuncs[i] = function($,n) { return !!$[n]; };
		} else if ( aFields[i] === 'static' ) {
			aFields[i] = 'scope';
			aFuncs[i] = function($,n) { return $[n] === 'static'; };
		} else if ( aFields[i].indexOf("#") === 0 ) {
			aFields[i] = aFields[i].slice(1);
			aFuncs[i] = function($,n) { return $.comment.getTag(n).length > 0; };
		}
	}
	return function(a, b) {
		// info("compare " + a.longname + " : " + b.longname);
		var r = 0,i,va,vb;
		for (i = 0; r === 0 && i < aFields.length; i++) {
			va = aFuncs[i](a,aFields[i]);
			vb = aFuncs[i](b,aFields[i]);
			if ( va && !vb ) {
				r = -aNorms[i];
			} else if ( !va && vb ) {
				r = aNorms[i];
			} else if ( va && vb ) {
				va = String(va).toLowerCase();
				vb = String(vb).toLowerCase();
				if (va < vb) {
					r = -aNorms[i];
				}
				if (va > vb) {
					r = aNorms[i];
				}
			}
			// debug("  " + aFields[i] + ": " + va + " ? " + vb + " = " + r);
		}
		return r;
	};
}
504435
def sg_leaky_relu(x, opt):
    
    """
    return tf.where(tf.greater(x, 0), x, 0.01 * x, name=opt.name)