This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Example usage to get/post data on server from client.py | |
``` | |
import requests | |
url = 'http://localhost:8000' | |
def get(url): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Simple chatroom | |
Reference | |
https://docs.python.org/2/library/threading.html | |
http://blog.oddbit.com/2013/11/23/long-polling-with-ja/ | |
http://zulko.github.io/blog/2013/09/19/a-basic-example-of-threads-synchronization-in-python/ | |
http://www.laurentluce.com/posts/python-threads-synchronization-locks-rlocks-semaphores-conditions-events-and-queues/ | |
''' | |
import time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from builtins import int | |
from shiboken2 import wrapInstance | |
from maya import cmds, OpenMayaUI as omui | |
from Qt import QtWidgets, QtCore | |
from Qt import _loadUi | |
def Dock(Widget, show=True): | |
name = Widget.__class__.__name__ |