A queue is similar to a list:
from Queue import Queue
my_list = []
my_list.append(1)
my_list.append(2)| var ParallelPipeline = (function() { | |
| var { objectType, ArrayType, Any } = TypedObject; | |
| function fromFunc(shape0, func, grainType) { | |
| var shape = []; | |
| if ((shape0 | 0) === shape0) | |
| shape.push(shape0 | 0); | |
| else { | |
| for (var i = 0; i < shape0.length; i++) { | |
| if ((shape0[i] | 0) !== shape0[0]) |
| def receive_command(): | |
| print("ENTERED") | |
| connection = pika.BlockingConnection(pika.ConnectionParameters(host='localhost')) | |
| print("1") | |
| channel = connection.channel() | |
| print("2") | |
| channel.exchange_declare(exchange='STORE_CMD', type='topic') | |
| print("3") | |
| result = channel.queue_declare(exclusive=True) | |
| print("4") |
title: Bash scripting keywords:
| root = true | |
| [*] | |
| charset = utf-8 | |
| end_of_line = lf | |
| indent_size = 2 | |
| indent_style = space | |
| insert_final_newline = true | |
| trim_trailing_whitespace = true |
| (function downloadAndRunCodeSnippet() { | |
| // form rawGit proxy url | |
| var ghUrl = 'bahmutov/code-snippets/master/first-paint.js'; | |
| var rawUrl = 'https://rawgit.com/' + ghUrl; | |
| // download and run the script | |
| var head = document.getElementsByTagName('head')[0]; | |
| var script = document.createElement('script'); | |
| script.type = 'text/javascript'; | |
| script.src = rawUrl; | |
| head.appendChild(script); |
| function stringSize(str) { | |
| // JavaScript strings are unicode UTF-16 up to 2 bytes per character | |
| return str.length * 2; | |
| } | |
| function objectSize(obj) { | |
| return stringSize(JSON.stringify(obj)); | |
| } | |
| var value = function value(key) { |
| // my-new-type.js | |
| /** | |
| * MyNewType definition | |
| * @typedef {MyNewType} MyNewType | |
| * @param {number} first | |
| * @param {number} second | |
| * @property {function} logFirst | |
| * @property {function} logSecond | |
| * @returns MyNewType | |
| */ |
| 'use strict'; | |
| /** | |
| * Creates an instance of the StatusCodeErrorItem | |
| * @memberof common | |
| * @constructor | |
| * @classdesc A class for holding information about an error. The params object allows the tracking of the function | |
| * parameters that caused the error, but should not be used to store large objects. | |
| * @description Creates an instance of the StatusCodeErrorItem with the given message and optional params object | |
| * @param {string} message The message for this error |