go build worker.go
go build sender.go
Start gnatsd
server and 3 worker processes. Then run test to send 3 messages at once.
It is expected that all 3 messages are picked up by 3 idle workers, and this may happen on
package main | |
import ( | |
"context" | |
"flag" | |
"log" | |
"time" | |
"google.golang.org/grpc" | |
"google.golang.org/grpc/credentials/insecure" |
import math | |
import pymel.core as pm | |
def insertKeyframeBetweenKeys(): | |
try: | |
objects = pm.ls(sl=1) | |
attrs = pm.selectionConnection('graphEditor1FromOutliner', q=1, object=1) | |
for attr in attrs: | |
buffer = attr.split(".") |
""" | |
"Connect rename command in QListWidget item edit" | |
https://groups.google.com/g/python_inside_maya/c/lPoWGuXyFsg/m/sLiWOaJgBAAJ | |
""" | |
from PySide2 import QtCore, QtGui, QtWidgets | |
class MyListWidget(QtWidgets.QListWidget): |
""" | |
https://groups.google.com/d/msg/python_inside_maya/1EzNG_i9Xes/Au-18UaXAwAJ | |
Capturing the start and end item/index information in a | |
PySide2 QTreeWidget internal drag and drop | |
""" | |
from __future__ import print_function | |
from PySide2 import QtCore, QtGui, QtWidgets |
#!/usr/bin/env python | |
""" | |
Read a serialized Protobuf FileDescriptorSet that was | |
generated from the protoc tool, and dynamically generate | |
the python classes for each message. | |
""" | |
import sys | |
from google.protobuf import descriptor_pb2 | |
from google.protobuf import reflection |
#!/usr/bin/env python | |
""" | |
Refs: | |
"[Maya-Python] Customized display of files/folders in a QTreeView that is using QFileSystemModel." | |
https://groups.google.com/d/topic/python_inside_maya/TaFm2yNToJ8/discussion | |
""" | |
from PySide import QtCore, QtGui | |
#include "libtest.hh" | |
std::string copy_string(std::string &s) { | |
std::string s2 = s; | |
return s2; | |
} |
package main | |
import ( | |
"os" | |
"testing" | |
"github.com/dgraph-io/badger" | |
) | |
/* |
#!/usr/bin/env python | |
""" | |
Pipes experiment. | |
Refs: https://gist.github.com/mottosso/dd59f815025e4d76f453f3555e39558e | |
""" | |
import os | |
import sys | |
import time | |
import argparse |