当前位置: 首页>>代码示例>>Python>>正文


Python User.__init__方法代码示例

本文整理汇总了Python中user.User.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python User.__init__方法的具体用法?Python User.__init__怎么用?Python User.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在user.User的用法示例。


在下文中一共展示了User.__init__方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from user import User [as 别名]
# 或者: from user.User import __init__ [as 别名]
    def __init__(self, userId, host, port, dirOutput, queryDict, **kwargs):
        User.__init__(self, userId, host, port, dirOutput, queryDict, **kwargs)

        self.scaleParameters = kwargs["scaleParameters"]
        self.config = kwargs["config"]
        self.config["reset"] = False
        self.config["execute"] = True
        self.perf = {}
        self.numErrors = 0
开发者ID:JWUST,项目名称:benchmark,代码行数:11,代码来源:bench_tpcc.py

示例2: __init__

# 需要导入模块: from user import User [as 别名]
# 或者: from user.User import __init__ [as 别名]
 def __init__(self, username, passwd, role, redfish=False):
     User.__init__(self, username, passwd, role, redfish)
     self.username = username
     self.passwd = passwd
     self.role = role
     self.rackhd_token = self.setRackHDToken(username, passwd)
     if self.rackhd_token is None:
         return None
     self.redfish_token = self.setRedfishToken(username, passwd)
     if self.redfish_token is None:
         return None
     Operator.num_operators += 1
开发者ID:PengTian0,项目名称:RackHD,代码行数:14,代码来源:operator.py

示例3: __init__

# 需要导入模块: from user import User [as 别名]
# 或者: from user.User import __init__ [as 别名]
    def __init__(self, name, version, *args, **kwargs):
        User.__init__(self, name, version, *args, **kwargs)
        if not isinstance(version, Color):
            # Because this is a visual user we should make the version a color
            raise TypeError(str(version) + " is not a Color")

        # Generates a unique id for the node
        self.id = uuid4()
        node_text = Text(self.name, fontname="Droid Sans", fontsize=14)
        self.node = Node(self.id, fill=version, strokewidth=1, radius=15)
        self.node.text = node_text
        self.edges = list()
开发者ID:lemonade512,项目名称:KhanAcademyProject,代码行数:14,代码来源:visual_user.py

示例4: __init__

# 需要导入模块: from user import User [as 别名]
# 或者: from user.User import __init__ [as 别名]
    def __init__(self, userId, host, port, dirOutput, queryDict, **kwargs):
        User.__init__(self, userId, host, port, dirOutput, queryDict, **kwargs)

        #        self.scaleParameters = kwargs["scaleParameters"]
        self._benchmarkQueries = kwargs["queries"] if kwargs.has_key("queries") else queries.QUERIES_ALL

        self._core = kwargs["core"] if kwargs.has_key("core") else 1
        self._prio = kwargs["prio"] if kwargs.has_key("prio") else 2
        # default assumes hyperthreading count of 2
        self._instances = kwargs["instances"] if kwargs.has_key("instances") else multiprocessing.cpu_count() / 2
        self._microsecs = kwargs["microsecs"] if kwargs.has_key("microsecs") else 1000
        self._db = kwargs["db"] if kwargs.has_key("db") else "cbtr"

        self._oltpQC = {}
        for q in OLTP_QUERY_FILES:
            self._oltpQC[q] = open(OLTP_QUERY_FILES[q], "r").read()

        self._olapQC = {}
        for q in OLAP_QUERY_FILES:
            self._olapQC[q] = open(OLAP_QUERY_FILES[q], "r").read()
        self.perf = {}
开发者ID:JWUST,项目名称:benchmark,代码行数:23,代码来源:bench_mixed.py

示例5: __init__

# 需要导入模块: from user import User [as 别名]
# 或者: from user.User import __init__ [as 别名]
 def __init__(self,link,nick):
     self.link = link
     User.__init__(self,link.server)
     self.nick = nick
     self.usr = nick
开发者ID:liberaza,项目名称:nameless-ircd,代码行数:7,代码来源:linkserv.py

示例6: __init__

# 需要导入模块: from user import User [as 别名]
# 或者: from user.User import __init__ [as 别名]
 def __init__(self, number, password, is_exit=False, user_list={}):
     User.__init__(self, number, password, is_exit)
     self.list = user_list
开发者ID:evillog,项目名称:Student-management-system,代码行数:5,代码来源:admin.py

示例7: Gui

# 需要导入模块: from user import User [as 别名]
# 或者: from user.User import __init__ [as 别名]
class Gui(QtGui.QMainWindow,QtGui.QWidget):

	def __init__(self):
		super(Gui, self).__init__()
		self.speaker = ""
		self.directory = ""
		self.type = ""
		self.line=0
		self.text=[]
		self.decode=""
		self.fname="output"
		self.rec=0
		self.initUI()
		self.file = ""

	def initUI(self):
		self.setWindowIcon(QtGui.QIcon('logo.png'))
		self.vr = VoiceRec()
		self.pl = Play()
		self.vrThread = QThread()
		self.plThread = QThread()
		self.vr.moveToThread(self.vrThread)
		self.pl.moveToThread(self.plThread)

		self.figure = plt.figure(1)
		self.canvas = FigureCanvas(self.figure)
		self.toolbar = NavigationToolbar(self.canvas, self)
		self.centralwidget = QtGui.QWidget(self)
		self.verticalLayout = QtGui.QVBoxLayout(self.centralwidget)
		self.verticalLayout.addWidget(self.toolbar)
		self.verticalLayout.addWidget(self.canvas)
		self.centralwidget.setGeometry(10,10,825,330)

		openFile = QtGui.QAction(QtGui.QIcon('open.png'), '&Open', self)
		openFile.setShortcut('Ctrl+O')
		openFile.setStatusTip('Open new File')
		openFile.triggered.connect(self.showDialogOpen)

		chUser = QtGui.QAction('&Change Speaker', self)
		chUser.setStatusTip('Change Speaker')
		chUser.triggered.connect(self.changeUser)

		exitAction = QtGui.QAction(QtGui.QIcon('exit.png'), '&Exit', self)
		exitAction.setShortcut('Ctrl+Q')
		exitAction.setStatusTip('Exit application')
		exitAction.triggered.connect(self.closeEvent)

		utf_8 = QtGui.QAction('&UTF-8', self)
		utf_8.setStatusTip('utf-8')
		utf_8.triggered.connect(self.encodeUTF8)

		utf_16 = QtGui.QAction('&UTF-16', self)
		utf_16.setStatusTip('utf-16')
		utf_16.triggered.connect(self.encodeUTF16)

		Ascii = QtGui.QAction('&ASCII', self)
		Ascii.setStatusTip('ascii')
		Ascii.triggered.connect(self.encodeASCII)

		about = QtGui.QAction('&About', self)
		about.setStatusTip('More About Voice Recorder')
		about.triggered.connect(self.showAbout)

		self.textEdit = QtGui.QTextEdit(self)
		self.textEdit.setGeometry(10,360,825,104)
		self.textEdit.setStyleSheet("QTextEdit {font-size: 14pt}")
		self.textEdit.setText("Please Open a File...")
		self.textEdit.setReadOnly(True)

		self.Open = QtGui.QPushButton('Open', self)
		self.Open.move(10,480)
		self.Open.clicked.connect(self.showDialogOpen)

		self.Record = QtGui.QPushButton('Record', self)
		self.Record.move(155,480)
		self.Record.setEnabled(False)
		self.Record.clicked.connect(self.record)

		self.Stop = QtGui.QPushButton('Stop', self)
		self.Stop.move(300,480)
		self.Stop.setEnabled(False)
		self.Stop.clicked.connect(self.stop)

		self.Play = QtGui.QPushButton('Play', self)
		self.Play.move(445,480)
		self.Play.setEnabled(False)
		self.Play.clicked.connect(self.play)

		self.Back = QtGui.QPushButton('Back', self)
		self.Back.move(590,480)
		self.Back.setEnabled(False)
		self.Back.clicked.connect(self.showBack)

		self.Next = QtGui.QPushButton('Next', self)
		self.Next.move(735,480)
		self.Next.setEnabled(False)
		self.Next.clicked.connect(self.showNext)

		menubar = self.menuBar()
		fileMenu = menubar.addMenu('&File')
#.........这里部分代码省略.........
开发者ID:nitishjain2007,项目名称:Tools_For_Data_Collection,代码行数:103,代码来源:gui.py

示例8: __init__

# 需要导入模块: from user import User [as 别名]
# 或者: from user.User import __init__ [as 别名]
 def __init__(self,nickname,email,phone,name,eid):
     User.__init__(self,nickname,email,phone,name,eid)
     self.requests = []
开发者ID:siliu3,项目名称:c-SewpPocket,代码行数:5,代码来源:consumer.py

示例9: __init__

# 需要导入模块: from user import User [as 别名]
# 或者: from user.User import __init__ [as 别名]
 def __init__(self, number, password, is_exit=False):
     User.__init__(self, number, password, is_exit)
开发者ID:evillog,项目名称:Student-management-system,代码行数:4,代码来源:teacher.py

示例10: __init__

# 需要导入模块: from user import User [as 别名]
# 或者: from user.User import __init__ [as 别名]
    def __init__(self, number, password, is_exit=False, score=0):
        User.__init__(self, number, password, is_exit)
        self._score = 0

        self.score = score
开发者ID:evillog,项目名称:Student-management-system,代码行数:7,代码来源:student.py


注:本文中的user.User.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。