This file contains hidden or 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
class Base(object): | |
"""Base class for mixer classes. All mixin classes | |
require the classes they are mixed in with to be | |
instances of this class (or a subclass).""" | |
def __init__(self,b): | |
self.b = b # Mixin classes assume this attribute will be present | |
class MixinBPlusOne(object): | |
"""A mixin class that implements the print_b_plus_one |
This file contains hidden or 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
# coding=utf-8 | |
import sys | |
class TailRecurseException: | |
def __init__(self, args, kwargs): | |
self.args = args | |
self.kwargs = kwargs | |
def tail_call_optimized(g): | |
""" |
This file contains hidden or 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
#!/bin/sh | |
TMP_FILE="/tmp/wslog_query_client.log" | |
#Usage | |
Usage() { | |
echo "wslog_query_client.sh [query_url] [user] [passwd] [start_time] [end_time] [channels]" | |
return 0 | |
} | |
#check input parameters | |
if [ $# -eq 1 ]; then |
This file contains hidden or 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
#include "twocamsvideostitching.h" | |
#include "ui_twocamsvideostitching.h" | |
twoCamsVideoStitching::twoCamsVideoStitching(QWidget *parent) : | |
QWidget(parent), | |
ui(new Ui::twoCamsVideoStitching) | |
{ | |
ui->setupUi(this); | |
} |
This file contains hidden or 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import sys | |
reload(sys) | |
sys.setdefaultencoding('utf-8') | |
import matplotlib | |
# matplotlib.use('Agg') | |
import numpy as np |
This file contains hidden or 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
import socket | |
import threading | |
class TcpChatServer: | |
def __init__(self, ip='192.168.110.13', port=9001): | |
self.ip = ip | |
self.port = port | |
self.clients = {} | |
self.sock = socket.socket(family=socket.AF_INET, type=socket.SOCK_STREAM) | |
self.event = threading.Event() | |
def recv(self, so, ip ,port): |
NewerOlder