prompt large_stringlengths 72 9.34k | completion large_stringlengths 0 7.61k |
|---|---|
<|file_name|>get_binary.py<|end_file_name|><|fim▁begin|>"""
CMSIS-DAP Interface Firmware
Copyright (c) 2009-2013 ARM Limited
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.or... | options = get_options()
in_path = get_interface_path(options.interface, options.target, bootloader=False)
_, name, _ = split_path(in_path)
out_path = join(TMP_DIR, name + '.bin')
print '\nELF: %s' % in_path
gen_binary(in_path, out_path, is_lpc(options.interface))
print "\nBINARY: %... |
<|file_name|>opening.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
<|fim▁hole|>
for i in range(100):
handler.put(i, 'numbers')
handler.close()<|fim▁end|> | from hdf5handler import HDF5Handler
handler = HDF5Handler('mydata.hdf5')
handler.open() |
<|file_name|>wordclusters.py<|end_file_name|><|fim▁begin|>import numpy as np
class WordClusters(object):
def __init__(self, vocab, clusters):
self.vocab = vocab
self.clusters = clusters
def ix(self, word):
"""
Returns the index on self.vocab and self.clusters for 'word'
... | def get_cluster(self, word): |
<|file_name|>wordclusters.py<|end_file_name|><|fim▁begin|>import numpy as np
class WordClusters(object):
<|fim_middle|>
<|fim▁end|> | def __init__(self, vocab, clusters):
self.vocab = vocab
self.clusters = clusters
def ix(self, word):
"""
Returns the index on self.vocab and self.clusters for 'word'
"""
temp = np.where(self.vocab == word)[0]
if temp.size == 0:
raise KeyError(... |
<|file_name|>wordclusters.py<|end_file_name|><|fim▁begin|>import numpy as np
class WordClusters(object):
def __init__(self, vocab, clusters):
<|fim_middle|>
def ix(self, word):
"""
Returns the index on self.vocab and self.clusters for 'word'
"""
temp = np.where(self.v... | self.vocab = vocab
self.clusters = clusters |
<|file_name|>wordclusters.py<|end_file_name|><|fim▁begin|>import numpy as np
class WordClusters(object):
def __init__(self, vocab, clusters):
self.vocab = vocab
self.clusters = clusters
def ix(self, word):
<|fim_middle|>
def __getitem__(self, word):
return self.get_clust... | """
Returns the index on self.vocab and self.clusters for 'word'
"""
temp = np.where(self.vocab == word)[0]
if temp.size == 0:
raise KeyError("Word not in vocabulary")
else:
return temp[0] |
<|file_name|>wordclusters.py<|end_file_name|><|fim▁begin|>import numpy as np
class WordClusters(object):
def __init__(self, vocab, clusters):
self.vocab = vocab
self.clusters = clusters
def ix(self, word):
"""
Returns the index on self.vocab and self.clusters for 'word'
... | return self.get_cluster(word) |
<|file_name|>wordclusters.py<|end_file_name|><|fim▁begin|>import numpy as np
class WordClusters(object):
def __init__(self, vocab, clusters):
self.vocab = vocab
self.clusters = clusters
def ix(self, word):
"""
Returns the index on self.vocab and self.clusters for 'word'
... | """
Returns the cluster number for a word in the vocabulary
"""
idx = self.ix(word)
return self.clusters[idx] |
<|file_name|>wordclusters.py<|end_file_name|><|fim▁begin|>import numpy as np
class WordClusters(object):
def __init__(self, vocab, clusters):
self.vocab = vocab
self.clusters = clusters
def ix(self, word):
"""
Returns the index on self.vocab and self.clusters for 'word'
... | return self.vocab[self.clusters == cluster] |
<|file_name|>wordclusters.py<|end_file_name|><|fim▁begin|>import numpy as np
class WordClusters(object):
def __init__(self, vocab, clusters):
self.vocab = vocab
self.clusters = clusters
def ix(self, word):
"""
Returns the index on self.vocab and self.clusters for 'word'
... | vocab = np.genfromtxt(fname, dtype=str, delimiter=" ", usecols=0)
clusters = np.genfromtxt(fname, dtype=int, delimiter=" ", usecols=1)
return cls(vocab=vocab, clusters=clusters) |
<|file_name|>wordclusters.py<|end_file_name|><|fim▁begin|>import numpy as np
class WordClusters(object):
def __init__(self, vocab, clusters):
self.vocab = vocab
self.clusters = clusters
def ix(self, word):
"""
Returns the index on self.vocab and self.clusters for 'word'
... | raise KeyError("Word not in vocabulary") |
<|file_name|>wordclusters.py<|end_file_name|><|fim▁begin|>import numpy as np
class WordClusters(object):
def __init__(self, vocab, clusters):
self.vocab = vocab
self.clusters = clusters
def ix(self, word):
"""
Returns the index on self.vocab and self.clusters for 'word'
... | return temp[0] |
<|file_name|>wordclusters.py<|end_file_name|><|fim▁begin|>import numpy as np
class WordClusters(object):
def <|fim_middle|>(self, vocab, clusters):
self.vocab = vocab
self.clusters = clusters
def ix(self, word):
"""
Returns the index on self.vocab and self.clusters for 'word'
... | __init__ |
<|file_name|>wordclusters.py<|end_file_name|><|fim▁begin|>import numpy as np
class WordClusters(object):
def __init__(self, vocab, clusters):
self.vocab = vocab
self.clusters = clusters
def <|fim_middle|>(self, word):
"""
Returns the index on self.vocab and self.clusters for '... | ix |
<|file_name|>wordclusters.py<|end_file_name|><|fim▁begin|>import numpy as np
class WordClusters(object):
def __init__(self, vocab, clusters):
self.vocab = vocab
self.clusters = clusters
def ix(self, word):
"""
Returns the index on self.vocab and self.clusters for 'word'
... | __getitem__ |
<|file_name|>wordclusters.py<|end_file_name|><|fim▁begin|>import numpy as np
class WordClusters(object):
def __init__(self, vocab, clusters):
self.vocab = vocab
self.clusters = clusters
def ix(self, word):
"""
Returns the index on self.vocab and self.clusters for 'word'
... | get_cluster |
<|file_name|>wordclusters.py<|end_file_name|><|fim▁begin|>import numpy as np
class WordClusters(object):
def __init__(self, vocab, clusters):
self.vocab = vocab
self.clusters = clusters
def ix(self, word):
"""
Returns the index on self.vocab and self.clusters for 'word'
... | get_words_on_cluster |
<|file_name|>wordclusters.py<|end_file_name|><|fim▁begin|>import numpy as np
class WordClusters(object):
def __init__(self, vocab, clusters):
self.vocab = vocab
self.clusters = clusters
def ix(self, word):
"""
Returns the index on self.vocab and self.clusters for 'word'
... | from_text |
<|file_name|>generate-certs.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# Copyright (c) 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
A chain with four possible intermediates with different notBefore and n... | target.set_validity_range(DATE_A, DATE_D)
|
<|file_name|>librarylogger.py<|end_file_name|><|fim▁begin|># Copyright 2008-2015 Nokia Solutions and Networks
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at<|fim▁hole|>#
# Unless requir... | #
# http://www.apache.org/licenses/LICENSE-2.0 |
<|file_name|>librarylogger.py<|end_file_name|><|fim▁begin|># Copyright 2008-2015 Nokia Solutions and Networks
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.or... | if callable(msg):
msg = unic(msg)
if level.upper() not in ('TRACE', 'DEBUG', 'INFO', 'HTML', 'WARN', 'ERROR'):
raise DataError("Invalid log level '%s'." % level)
if threading.currentThread().getName() in LOGGING_THREADS:
LOGGER.log_message(Message(msg, level, html)) |
<|file_name|>librarylogger.py<|end_file_name|><|fim▁begin|># Copyright 2008-2015 Nokia Solutions and Networks
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.or... | write(msg, 'TRACE', html) |
<|file_name|>librarylogger.py<|end_file_name|><|fim▁begin|># Copyright 2008-2015 Nokia Solutions and Networks
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.or... | write(msg, 'DEBUG', html) |
<|file_name|>librarylogger.py<|end_file_name|><|fim▁begin|># Copyright 2008-2015 Nokia Solutions and Networks
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.or... | write(msg, 'INFO', html)
if also_console:
console(msg) |
<|file_name|>librarylogger.py<|end_file_name|><|fim▁begin|># Copyright 2008-2015 Nokia Solutions and Networks
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.or... | write(msg, 'WARN', html) |
<|file_name|>librarylogger.py<|end_file_name|><|fim▁begin|># Copyright 2008-2015 Nokia Solutions and Networks
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.or... | write(msg, 'ERROR', html) |
<|file_name|>librarylogger.py<|end_file_name|><|fim▁begin|># Copyright 2008-2015 Nokia Solutions and Networks
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.or... | msg = unic(msg)
if newline:
msg += '\n'
stream = sys.__stdout__ if stream.lower() != 'stderr' else sys.__stderr__
stream.write(encode_output(msg))
stream.flush() |
<|file_name|>librarylogger.py<|end_file_name|><|fim▁begin|># Copyright 2008-2015 Nokia Solutions and Networks
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.or... | msg = unic(msg) |
<|file_name|>librarylogger.py<|end_file_name|><|fim▁begin|># Copyright 2008-2015 Nokia Solutions and Networks
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.or... | raise DataError("Invalid log level '%s'." % level) |
<|file_name|>librarylogger.py<|end_file_name|><|fim▁begin|># Copyright 2008-2015 Nokia Solutions and Networks
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.or... | LOGGER.log_message(Message(msg, level, html)) |
<|file_name|>librarylogger.py<|end_file_name|><|fim▁begin|># Copyright 2008-2015 Nokia Solutions and Networks
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.or... | console(msg) |
<|file_name|>librarylogger.py<|end_file_name|><|fim▁begin|># Copyright 2008-2015 Nokia Solutions and Networks
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.or... | msg += '\n' |
<|file_name|>librarylogger.py<|end_file_name|><|fim▁begin|># Copyright 2008-2015 Nokia Solutions and Networks
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.or... | write |
<|file_name|>librarylogger.py<|end_file_name|><|fim▁begin|># Copyright 2008-2015 Nokia Solutions and Networks
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.or... | trace |
<|file_name|>librarylogger.py<|end_file_name|><|fim▁begin|># Copyright 2008-2015 Nokia Solutions and Networks
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.or... | debug |
<|file_name|>librarylogger.py<|end_file_name|><|fim▁begin|># Copyright 2008-2015 Nokia Solutions and Networks
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.or... | info |
<|file_name|>librarylogger.py<|end_file_name|><|fim▁begin|># Copyright 2008-2015 Nokia Solutions and Networks
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.or... | warn |
<|file_name|>librarylogger.py<|end_file_name|><|fim▁begin|># Copyright 2008-2015 Nokia Solutions and Networks
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.or... | error |
<|file_name|>librarylogger.py<|end_file_name|><|fim▁begin|># Copyright 2008-2015 Nokia Solutions and Networks
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.or... | console |
<|file_name|>webModifySqlAPI.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
webModifySqlAPI
~~~~~~~~~~~~~~
为web应用与后台数据库操作(插入,更新,删除操作)的接口
api_functions 中的DataApiFunc.py为其接口函数汇聚点,所有全局变量设置都在此;所有后台函数调用都在此设置
Implementation helpers for the JSON support in Flask.
:copyright: (c) 2015 by A... | def update_newvsimtest_info_table(): |
<|file_name|>webModifySqlAPI.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
webModifySqlAPI
~~~~~~~~~~~~~~
为web应用与后台数据库操作(插入,更新,删除操作)的接口
api_functions 中的DataApiFunc.py为其接口函数汇聚点,所有全局变量设置都在此;所有后台函数调用都在此设置
Implementation helpers for the JSON support in Flask.
:copyright: (c) 2015 by A... | ayData)
else:
returnJsonData = {'err': True, 'errinfo': '操作违法!', 'data': []}
return json.dumps(returnJsonData, sort_keys=True, indent=4, default=json_util.default)
@api.route('/insert_manulVsim/', methods=['POST'])
def insert_manulVsim():
"""
:return:
"""
if request.method =... |
<|file_name|>webModifySqlAPI.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
webModifySqlAPI
~~~~~~~~~~~~~~
为web应用与后台数据库操作(插入,更新,删除操作)的接口
api_functions 中的DataApiFunc.py为其接口函数汇聚点,所有全局变量设置都在此;所有后台函数调用都在此设置
Implementation helpers for the JSON support in Flask.
:copyright: (c) 2015 by A... |
else:
returnJsonData = {'err': True, 'errinfo': '操作违法!', 'data': []}
return json.dumps(returnJsonData, sort_keys=True, indent=4, default=json_util.default)
@api.route('/update_manulVsim/', methods=['POST'])
def update_manulVsim():
"""
:return:
"""
if request.method == 'POST'... |
<|file_name|>webModifySqlAPI.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
webModifySqlAPI
~~~~~~~~~~~~~~
为web应用与后台数据库操作(插入,更新,删除操作)的接口
api_functions 中的DataApiFunc.py为其接口函数汇聚点,所有全局变量设置都在此;所有后台函数调用都在此设置
Implementation helpers for the JSON support in Flask.
:copyright: (c) 2015 by A... |
returnJsonData = {'err': True, 'errinfo': '操作违法!', 'data': []}
return json.dumps(returnJsonData, sort_keys=True, indent=4, default=json_util.default)
@api.route('/delet_newvsimtest_info_table/', methods=['POST'])
def delet_newvsimtest_info_table():
"""
:return:
"""
if request.me... |
<|file_name|>webModifySqlAPI.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
webModifySqlAPI
~~~~~~~~~~~~~~
为web应用与后台数据库操作(插入,更新,删除操作)的接口
api_functions 中的DataApiFunc.py为其接口函数汇聚点,所有全局变量设置都在此;所有后台函数调用都在此设置
Implementation helpers for the JSON support in Flask.
:copyright: (c) 2015 by A... | returnJsonData = {'err': True, 'errinfo': '操作违法!', 'data': []}
return json.dumps(returnJsonData, sort_keys=True, indent=4, default=json_util.default)
@api.route('/insert_newvsimtest_info_table/', methods=['POST'])
def insert_newvsimtest_info_table():
"""
:return:
"""
if request.method =... |
<|file_name|>webModifySqlAPI.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
webModifySqlAPI
~~~~~~~~~~~~~~
为web应用与后台数据库操作(插入,更新,删除操作)的接口
api_functions 中的DataApiFunc.py为其接口函数汇聚点,所有全局变量设置都在此;所有后台函数调用都在此设置
Implementation helpers for the JSON support in Flask.
:copyright: (c) 2015 by A... | nData = {'err': True, 'errinfo': '操作违法!', 'data': []}
return json.dumps(returnJsonData, sort_keys=True, indent=4, default=json_util.default)
@api.route('/update_newvsimtest_info_table/', methods=['POST'])
def update_newvsimtest_info_table():
"""
:return:
"""
if request.method == 'POST':
... |
<|file_name|>webModifySqlAPI.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
webModifySqlAPI
~~~~~~~~~~~~~~
为web应用与后台数据库操作(插入,更新,删除操作)的接口
api_functions 中的DataApiFunc.py为其接口函数汇聚点,所有全局变量设置都在此;所有后台函数调用都在此设置
Implementation helpers for the JSON support in Flask.
:copyright: (c) 2015 by A... | err': True, 'errinfo': '操作违法!', 'data': []}
return json.dumps(returnJsonData, sort_keys=True, indent=4, default=json_util.default) |
<|file_name|>webModifySqlAPI.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
webModifySqlAPI
~~~~~~~~~~~~~~
为web应用与后台数据库操作(插入,更新,删除操作)的接口
api_functions 中的DataApiFunc.py为其接口函数汇聚点,所有全局变量设置都在此;所有后台函数调用都在此设置
Implementation helpers for the JSON support in Flask.
:copyright: (c) 2015 by A... | : '操作违法!', 'data': []}
return json.dumps(returnJsonData, sort_keys=True, indent=4, default=json |
<|file_name|>webModifySqlAPI.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
webModifySqlAPI
~~~~~~~~~~~~~~
为web应用与后台数据库操作(插入,更新,删除操作)的接口
api_functions 中的DataApiFunc.py为其接口函数汇聚点,所有全局变量设置都在此;所有后台函数调用都在此设置
Implementation helpers for the JSON support in Flask.
:copyright: (c) 2015 by A... | i.route('/insert_manulVsim/', methods=['POST'])
def insert_manulVsim():
"""
:return:
"""
if request.method == 'POST':
arrayData = request.get_a |
<|file_name|>webModifySqlAPI.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
webModifySqlAPI
~~~~~~~~~~~~~~
为web应用与后台数据库操作(插入,更新,删除操作)的接口
api_functions 中的DataApiFunc.py为其接口函数汇聚点,所有全局变量设置都在此;所有后台函数调用都在此设置
Implementation helpers for the JSON support in Flask.
:copyright: (c) 2015 by A... | ', 'data': []}
return json.dumps(returnJsonData, sort_keys=True, indent=4, default=json_util.defa |
<|file_name|>webModifySqlAPI.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
webModifySqlAPI
~~~~~~~~~~~~~~
为web应用与后台数据库操作(插入,更新,删除操作)的接口
api_functions 中的DataApiFunc.py为其接口函数汇聚点,所有全局变量设置都在此;所有后台函数调用都在此设置
Implementation helpers for the JSON support in Flask.
:copyright: (c) 2015 by A... | update_manulVsim/', methods=['POST'])
def update_manulVsim():
"""
:return:
"""
if request.method == 'POST':
arrayData = request.get_array(field |
<|file_name|>webModifySqlAPI.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
webModifySqlAPI
~~~~~~~~~~~~~~
为web应用与后台数据库操作(插入,更新,删除操作)的接口
api_functions 中的DataApiFunc.py为其接口函数汇聚点,所有全局变量设置都在此;所有后台函数调用都在此设置
Implementation helpers for the JSON support in Flask.
:copyright: (c) 2015 by A... | []}
return json.dumps(returnJsonData, sort_keys=True, indent=4, default=json_util.default)
@ap |
<|file_name|>webModifySqlAPI.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
webModifySqlAPI
~~~~~~~~~~~~~~
为web应用与后台数据库操作(插入,更新,删除操作)的接口
api_functions 中的DataApiFunc.py为其接口函数汇聚点,所有全局变量设置都在此;所有后台函数调用都在此设置
Implementation helpers for the JSON support in Flask.
:copyright: (c) 2015 by A... | simtest_info_table/', methods=['POST'])
def delet_newvsimtest_info_table():
"""
:return:
"""
if request.method == 'POST':
arrayData = request.g |
<|file_name|>webModifySqlAPI.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
webModifySqlAPI
~~~~~~~~~~~~~~
为web应用与后台数据库操作(插入,更新,删除操作)的接口
api_functions 中的DataApiFunc.py为其接口函数汇聚点,所有全局变量设置都在此;所有后台函数调用都在此设置
Implementation helpers for the JSON support in Flask.
:copyright: (c) 2015 by A... | return json.dumps(returnJsonData, sort_keys=True, indent=4, default=json_util.default)
@api.route('/ |
<|file_name|>webModifySqlAPI.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
webModifySqlAPI
~~~~~~~~~~~~~~
为web应用与后台数据库操作(插入,更新,删除操作)的接口
api_functions 中的DataApiFunc.py为其接口函数汇聚点,所有全局变量设置都在此;所有后台函数调用都在此设置
Implementation helpers for the JSON support in Flask.
:copyright: (c) 2015 by A... | nfo_table/', methods=['POST'])
def insert_newvsimtest_info_table():
"""
:return:
"""
if request.method == 'POST':
arrayData = request.get_array |
<|file_name|>webModifySqlAPI.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
webModifySqlAPI
~~~~~~~~~~~~~~
为web应用与后台数据库操作(插入,更新,删除操作)的接口
api_functions 中的DataApiFunc.py为其接口函数汇聚点,所有全局变量设置都在此;所有后台函数调用都在此设置
Implementation helpers for the JSON support in Flask.
:copyright: (c) 2015 by A... | rn json.dumps(returnJsonData, sort_keys=True, indent=4, default=json_util.default)
@api.route('/update_new |
<|file_name|>webModifySqlAPI.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
webModifySqlAPI
~~~~~~~~~~~~~~
为web应用与后台数据库操作(插入,更新,删除操作)的接口
api_functions 中的DataApiFunc.py为其接口函数汇聚点,所有全局变量设置都在此;所有后台函数调用都在此设置
Implementation helpers for the JSON support in Flask.
:copyright: (c) 2015 by A... | ', methods=['POST'])
def update_newvsimtest_info_table():
"""
:return:
"""
if request.method == 'POST':
arrayData = request.get_array(field_nam |
<|file_name|>webModifySqlAPI.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
webModifySqlAPI
~~~~~~~~~~~~~~
为web应用与后台数据库操作(插入,更新,删除操作)的接口
api_functions 中的DataApiFunc.py为其接口函数汇聚点,所有全局变量设置都在此;所有后台函数调用都在此设置
Implementation helpers for the JSON support in Flask.
:copyright: (c) 2015 by A... | mps(returnJsonData, sort_keys=True, indent=4, default=json_util.default) |
<|file_name|>webModifySqlAPI.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
webModifySqlAPI
~~~~~~~~~~~~~~
为web应用与后台数据库操作(插入,更新,删除操作)的接口
api_functions 中的DataApiFunc.py为其接口函数汇聚点,所有全局变量设置都在此;所有后台函数调用都在此设置
Implementation helpers for the JSON support in Flask.
:copyright: (c) 2015 by A... | |
<|file_name|>webModifySqlAPI.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
webModifySqlAPI
~~~~~~~~~~~~~~
为web应用与后台数据库操作(插入,更新,删除操作)的接口
api_functions 中的DataApiFunc.py为其接口函数汇聚点,所有全局变量设置都在此;所有后台函数调用都在此设置
Implementation helpers for the JSON support in Flask.
:copyright: (c) 2015 by A... | eVsimSrc(array_ |
<|file_name|>webModifySqlAPI.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
webModifySqlAPI
~~~~~~~~~~~~~~
为web应用与后台数据库操作(插入,更新,删除操作)的接口
api_functions 中的DataApiFunc.py为其接口函数汇聚点,所有全局变量设置都在此;所有后台函数调用都在此设置
Implementation helpers for the JSON support in Flask.
:copyright: (c) 2015 by A... | c(array_data=arr |
<|file_name|>webModifySqlAPI.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
webModifySqlAPI
~~~~~~~~~~~~~~
为web应用与后台数据库操作(插入,更新,删除操作)的接口
api_functions 中的DataApiFunc.py为其接口函数汇聚点,所有全局变量设置都在此;所有后台函数调用都在此设置
Implementation helpers for the JSON support in Flask.
:copyright: (c) 2015 by A... | ta=arrayData)
|
<|file_name|>webModifySqlAPI.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
webModifySqlAPI
~~~~~~~~~~~~~~
为web应用与后台数据库操作(插入,更新,删除操作)的接口
api_functions 中的DataApiFunc.py为其接口函数汇聚点,所有全局变量设置都在此;所有后台函数调用都在此设置
Implementation helpers for the JSON support in Flask.
:copyright: (c) 2015 by A... | y_data=arrayData)
else: |
<|file_name|>webModifySqlAPI.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
webModifySqlAPI
~~~~~~~~~~~~~~
为web应用与后台数据库操作(插入,更新,删除操作)的接口
api_functions 中的DataApiFunc.py为其接口函数汇聚点,所有全局变量设置都在此;所有后台函数调用都在此设置
Implementation helpers for the JSON support in Flask.
:copyright: (c) 2015 by A... | rayData)
else:
r |
<|file_name|>webModifySqlAPI.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
webModifySqlAPI
~~~~~~~~~~~~~~
为web应用与后台数据库操作(插入,更新,删除操作)的接口
api_functions 中的DataApiFunc.py为其接口函数汇聚点,所有全局变量设置都在此;所有后台函数调用都在此设置
Implementation helpers for the JSON support in Flask.
:copyright: (c) 2015 by A... | else:
returnJsonD |
<|file_name|>app.py<|end_file_name|><|fim▁begin|>import sys
sys.path.append("helper")
import web
from helper import session
<|fim▁hole|>
urls = (
"/", "controller.start.index",
"/1", "controller.start.one",
"/2", "controller.start.two",
)
app = web.application(urls, globals())
sessions = session.Sessions()
if ... | web.config.debug = False |
<|file_name|>app.py<|end_file_name|><|fim▁begin|>import sys
sys.path.append("helper")
import web
from helper import session
web.config.debug = False
urls = (
"/", "controller.start.index",
"/1", "controller.start.one",
"/2", "controller.start.two",
)
app = web.application(urls, globals())
sessions = session.Se... | app.run() |
<|file_name|>io.py<|end_file_name|><|fim▁begin|>from PyQt4 import QtGui, QtCore, QtSvg
from PyQt4.QtCore import QMimeData
from PyQt4.QtGui import QGraphicsScene, QGraphicsView, QWidget, QApplication
from Orange.data.io import FileFormat
class ImgFormat(FileFormat):
@staticmethod
def _get_buffer(size, filenam... | raise NotImplementedError
@staticmethod |
<|file_name|>io.py<|end_file_name|><|fim▁begin|>from PyQt4 import QtGui, QtCore, QtSvg
from PyQt4.QtCore import QMimeData
from PyQt4.QtGui import QGraphicsScene, QGraphicsView, QWidget, QApplication
from Orange.data.io import FileFormat
class ImgFormat(FileFormat):
<|fim_middle|>
class PngFormat(ImgFormat):
... | @staticmethod
def _get_buffer(size, filename):
raise NotImplementedError
@staticmethod
def _get_target(scene, painter, buffer):
raise NotImplementedError
@staticmethod
def _save_buffer(buffer, filename):
raise NotImplementedError
@staticmethod
def _get_exporter... |
<|file_name|>io.py<|end_file_name|><|fim▁begin|>from PyQt4 import QtGui, QtCore, QtSvg
from PyQt4.QtCore import QMimeData
from PyQt4.QtGui import QGraphicsScene, QGraphicsView, QWidget, QApplication
from Orange.data.io import FileFormat
class ImgFormat(FileFormat):
@staticmethod
def _get_buffer(size, filenam... | raise NotImplementedError |
<|file_name|>io.py<|end_file_name|><|fim▁begin|>from PyQt4 import QtGui, QtCore, QtSvg
from PyQt4.QtCore import QMimeData
from PyQt4.QtGui import QGraphicsScene, QGraphicsView, QWidget, QApplication
from Orange.data.io import FileFormat
class ImgFormat(FileFormat):
@staticmethod
def _get_buffer(size, filenam... | raise NotImplementedError |
<|file_name|>io.py<|end_file_name|><|fim▁begin|>from PyQt4 import QtGui, QtCore, QtSvg
from PyQt4.QtCore import QMimeData
from PyQt4.QtGui import QGraphicsScene, QGraphicsView, QWidget, QApplication
from Orange.data.io import FileFormat
class ImgFormat(FileFormat):
@staticmethod
def _get_buffer(size, filenam... | raise NotImplementedError |
<|file_name|>io.py<|end_file_name|><|fim▁begin|>from PyQt4 import QtGui, QtCore, QtSvg
from PyQt4.QtCore import QMimeData
from PyQt4.QtGui import QGraphicsScene, QGraphicsView, QWidget, QApplication
from Orange.data.io import FileFormat
class ImgFormat(FileFormat):
@staticmethod
def _get_buffer(size, filenam... | raise NotImplementedError |
<|file_name|>io.py<|end_file_name|><|fim▁begin|>from PyQt4 import QtGui, QtCore, QtSvg
from PyQt4.QtCore import QMimeData
from PyQt4.QtGui import QGraphicsScene, QGraphicsView, QWidget, QApplication
from Orange.data.io import FileFormat
class ImgFormat(FileFormat):
@staticmethod
def _get_buffer(size, filenam... | raise NotImplementedError |
<|file_name|>io.py<|end_file_name|><|fim▁begin|>from PyQt4 import QtGui, QtCore, QtSvg
from PyQt4.QtCore import QMimeData
from PyQt4.QtGui import QGraphicsScene, QGraphicsView, QWidget, QApplication
from Orange.data.io import FileFormat
class ImgFormat(FileFormat):
@staticmethod
def _get_buffer(size, filenam... | try:
scene = scene.scene()
scenerect = scene.sceneRect() #preserve scene bounding rectangle
viewrect = scene.views()[0].sceneRect()
scene.setSceneRect(viewrect)
backgroundbrush = scene.backgroundBrush() #preserve scene background brush
s... |
<|file_name|>io.py<|end_file_name|><|fim▁begin|>from PyQt4 import QtGui, QtCore, QtSvg
from PyQt4.QtCore import QMimeData
from PyQt4.QtGui import QGraphicsScene, QGraphicsView, QWidget, QApplication
from Orange.data.io import FileFormat
class ImgFormat(FileFormat):
@staticmethod
def _get_buffer(size, filenam... | if type(scene) == dict:
scene = scene['scene']
cls.write_image(filename, scene) |
<|file_name|>io.py<|end_file_name|><|fim▁begin|>from PyQt4 import QtGui, QtCore, QtSvg
from PyQt4.QtCore import QMimeData
from PyQt4.QtGui import QGraphicsScene, QGraphicsView, QWidget, QApplication
from Orange.data.io import FileFormat
class ImgFormat(FileFormat):
@staticmethod
def _get_buffer(size, filenam... | EXTENSIONS = ('.png',)
DESCRIPTION = 'Portable Network Graphics'
PRIORITY = 50
@staticmethod
def _get_buffer(size, filename):
return QtGui.QPixmap(int(size.width()), int(size.height()))
@staticmethod
def _get_target(scene, painter, buffer, source):
try:
brush = ... |
<|file_name|>io.py<|end_file_name|><|fim▁begin|>from PyQt4 import QtGui, QtCore, QtSvg
from PyQt4.QtCore import QMimeData
from PyQt4.QtGui import QGraphicsScene, QGraphicsView, QWidget, QApplication
from Orange.data.io import FileFormat
class ImgFormat(FileFormat):
@staticmethod
def _get_buffer(size, filenam... | return QtGui.QPixmap(int(size.width()), int(size.height())) |
<|file_name|>io.py<|end_file_name|><|fim▁begin|>from PyQt4 import QtGui, QtCore, QtSvg
from PyQt4.QtCore import QMimeData
from PyQt4.QtGui import QGraphicsScene, QGraphicsView, QWidget, QApplication
from Orange.data.io import FileFormat
class ImgFormat(FileFormat):
@staticmethod
def _get_buffer(size, filenam... | try:
brush = scene.backgroundBrush()
if brush.style() == QtCore.Qt.NoBrush:
brush = QtGui.QBrush(scene.palette().color(QtGui.QPalette.Base))
except AttributeError: # not a QGraphicsView/Scene
brush = QtGui.QBrush(QtCore.Qt.white)
painter.fillR... |
<|file_name|>io.py<|end_file_name|><|fim▁begin|>from PyQt4 import QtGui, QtCore, QtSvg
from PyQt4.QtCore import QMimeData
from PyQt4.QtGui import QGraphicsScene, QGraphicsView, QWidget, QApplication
from Orange.data.io import FileFormat
class ImgFormat(FileFormat):
@staticmethod
def _get_buffer(size, filenam... | buffer.save(filename, "png") |
<|file_name|>io.py<|end_file_name|><|fim▁begin|>from PyQt4 import QtGui, QtCore, QtSvg
from PyQt4.QtCore import QMimeData
from PyQt4.QtGui import QGraphicsScene, QGraphicsView, QWidget, QApplication
from Orange.data.io import FileFormat
class ImgFormat(FileFormat):
@staticmethod
def _get_buffer(size, filenam... | from pyqtgraph.exporters.ImageExporter import ImageExporter
return ImageExporter |
<|file_name|>io.py<|end_file_name|><|fim▁begin|>from PyQt4 import QtGui, QtCore, QtSvg
from PyQt4.QtCore import QMimeData
from PyQt4.QtGui import QGraphicsScene, QGraphicsView, QWidget, QApplication
from Orange.data.io import FileFormat
class ImgFormat(FileFormat):
@staticmethod
def _get_buffer(size, filenam... | buffer = exporter.export(toBytes=True)
buffer.save(filename, "png") |
<|file_name|>io.py<|end_file_name|><|fim▁begin|>from PyQt4 import QtGui, QtCore, QtSvg
from PyQt4.QtCore import QMimeData
from PyQt4.QtGui import QGraphicsScene, QGraphicsView, QWidget, QApplication
from Orange.data.io import FileFormat
class ImgFormat(FileFormat):
@staticmethod
def _get_buffer(size, filenam... | EXTENSIONS = ()
DESCRIPTION = 'System Clipboard'
PRIORITY = 50
@staticmethod
def _save_buffer(buffer, _):
QApplication.clipboard().setPixmap(buffer)
@staticmethod
def _export(exporter, _):
buffer = exporter.export(toBytes=True)
mimedata = QMimeData()
mimedat... |
<|file_name|>io.py<|end_file_name|><|fim▁begin|>from PyQt4 import QtGui, QtCore, QtSvg
from PyQt4.QtCore import QMimeData
from PyQt4.QtGui import QGraphicsScene, QGraphicsView, QWidget, QApplication
from Orange.data.io import FileFormat
class ImgFormat(FileFormat):
@staticmethod
def _get_buffer(size, filenam... | QApplication.clipboard().setPixmap(buffer) |
<|file_name|>io.py<|end_file_name|><|fim▁begin|>from PyQt4 import QtGui, QtCore, QtSvg
from PyQt4.QtCore import QMimeData
from PyQt4.QtGui import QGraphicsScene, QGraphicsView, QWidget, QApplication
from Orange.data.io import FileFormat
class ImgFormat(FileFormat):
@staticmethod
def _get_buffer(size, filenam... | buffer = exporter.export(toBytes=True)
mimedata = QMimeData()
mimedata.setData("image/png", buffer)
QApplication.clipboard().setMimeData(mimedata) |
<|file_name|>io.py<|end_file_name|><|fim▁begin|>from PyQt4 import QtGui, QtCore, QtSvg
from PyQt4.QtCore import QMimeData
from PyQt4.QtGui import QGraphicsScene, QGraphicsView, QWidget, QApplication
from Orange.data.io import FileFormat
class ImgFormat(FileFormat):
@staticmethod
def _get_buffer(size, filenam... | EXTENSIONS = ('.svg',)
DESCRIPTION = 'Scalable Vector Graphics'
PRIORITY = 100
@staticmethod
def _get_buffer(size, filename):
buffer = QtSvg.QSvgGenerator()
buffer.setFileName(filename)
buffer.setSize(QtCore.QSize(int(size.width()), int(size.height())))
return buffer... |
<|file_name|>io.py<|end_file_name|><|fim▁begin|>from PyQt4 import QtGui, QtCore, QtSvg
from PyQt4.QtCore import QMimeData
from PyQt4.QtGui import QGraphicsScene, QGraphicsView, QWidget, QApplication
from Orange.data.io import FileFormat
class ImgFormat(FileFormat):
@staticmethod
def _get_buffer(size, filenam... | buffer = QtSvg.QSvgGenerator()
buffer.setFileName(filename)
buffer.setSize(QtCore.QSize(int(size.width()), int(size.height())))
return buffer |
<|file_name|>io.py<|end_file_name|><|fim▁begin|>from PyQt4 import QtGui, QtCore, QtSvg
from PyQt4.QtCore import QMimeData
from PyQt4.QtGui import QGraphicsScene, QGraphicsView, QWidget, QApplication
from Orange.data.io import FileFormat
class ImgFormat(FileFormat):
@staticmethod
def _get_buffer(size, filenam... | return QtCore.QRectF(0, 0, source.width(), source.height()) |
<|file_name|>io.py<|end_file_name|><|fim▁begin|>from PyQt4 import QtGui, QtCore, QtSvg
from PyQt4.QtCore import QMimeData
from PyQt4.QtGui import QGraphicsScene, QGraphicsView, QWidget, QApplication
from Orange.data.io import FileFormat
class ImgFormat(FileFormat):
@staticmethod
def _get_buffer(size, filenam... | pass |
<|file_name|>io.py<|end_file_name|><|fim▁begin|>from PyQt4 import QtGui, QtCore, QtSvg
from PyQt4.QtCore import QMimeData
from PyQt4.QtGui import QGraphicsScene, QGraphicsView, QWidget, QApplication
from Orange.data.io import FileFormat
class ImgFormat(FileFormat):
@staticmethod
def _get_buffer(size, filenam... | from pyqtgraph.exporters.SVGExporter import SVGExporter
return SVGExporter |
<|file_name|>io.py<|end_file_name|><|fim▁begin|>from PyQt4 import QtGui, QtCore, QtSvg
from PyQt4.QtCore import QMimeData
from PyQt4.QtGui import QGraphicsScene, QGraphicsView, QWidget, QApplication
from Orange.data.io import FileFormat
class ImgFormat(FileFormat):
@staticmethod
def _get_buffer(size, filenam... | exporter.export(filename) |
<|file_name|>io.py<|end_file_name|><|fim▁begin|>from PyQt4 import QtGui, QtCore, QtSvg
from PyQt4.QtCore import QMimeData
from PyQt4.QtGui import QGraphicsScene, QGraphicsView, QWidget, QApplication
from Orange.data.io import FileFormat
class ImgFormat(FileFormat):
@staticmethod
def _get_buffer(size, filenam... | rect = scene.sceneRect() |
<|file_name|>io.py<|end_file_name|><|fim▁begin|>from PyQt4 import QtGui, QtCore, QtSvg
from PyQt4.QtCore import QMimeData
from PyQt4.QtGui import QGraphicsScene, QGraphicsView, QWidget, QApplication
from Orange.data.io import FileFormat
class ImgFormat(FileFormat):
@staticmethod
def _get_buffer(size, filenam... | rect = scene.rect() |
<|file_name|>io.py<|end_file_name|><|fim▁begin|>from PyQt4 import QtGui, QtCore, QtSvg
from PyQt4.QtCore import QMimeData
from PyQt4.QtGui import QGraphicsScene, QGraphicsView, QWidget, QApplication
from Orange.data.io import FileFormat
class ImgFormat(FileFormat):
@staticmethod
def _get_buffer(size, filenam... | scene = scene['scene'] |
<|file_name|>io.py<|end_file_name|><|fim▁begin|>from PyQt4 import QtGui, QtCore, QtSvg
from PyQt4.QtCore import QMimeData
from PyQt4.QtGui import QGraphicsScene, QGraphicsView, QWidget, QApplication
from Orange.data.io import FileFormat
class ImgFormat(FileFormat):
@staticmethod
def _get_buffer(size, filenam... | brush = QtGui.QBrush(scene.palette().color(QtGui.QPalette.Base)) |
<|file_name|>io.py<|end_file_name|><|fim▁begin|>from PyQt4 import QtGui, QtCore, QtSvg
from PyQt4.QtCore import QMimeData
from PyQt4.QtGui import QGraphicsScene, QGraphicsView, QWidget, QApplication
from Orange.data.io import FileFormat
class ImgFormat(FileFormat):
@staticmethod
def <|fim_middle|>(size, file... | _get_buffer |
<|file_name|>io.py<|end_file_name|><|fim▁begin|>from PyQt4 import QtGui, QtCore, QtSvg
from PyQt4.QtCore import QMimeData
from PyQt4.QtGui import QGraphicsScene, QGraphicsView, QWidget, QApplication
from Orange.data.io import FileFormat
class ImgFormat(FileFormat):
@staticmethod
def _get_buffer(size, filenam... | _get_target |
<|file_name|>io.py<|end_file_name|><|fim▁begin|>from PyQt4 import QtGui, QtCore, QtSvg
from PyQt4.QtCore import QMimeData
from PyQt4.QtGui import QGraphicsScene, QGraphicsView, QWidget, QApplication
from Orange.data.io import FileFormat
class ImgFormat(FileFormat):
@staticmethod
def _get_buffer(size, filenam... | _save_buffer |
<|file_name|>io.py<|end_file_name|><|fim▁begin|>from PyQt4 import QtGui, QtCore, QtSvg
from PyQt4.QtCore import QMimeData
from PyQt4.QtGui import QGraphicsScene, QGraphicsView, QWidget, QApplication
from Orange.data.io import FileFormat
class ImgFormat(FileFormat):
@staticmethod
def _get_buffer(size, filenam... | _get_exporter |
<|file_name|>io.py<|end_file_name|><|fim▁begin|>from PyQt4 import QtGui, QtCore, QtSvg
from PyQt4.QtCore import QMimeData
from PyQt4.QtGui import QGraphicsScene, QGraphicsView, QWidget, QApplication
from Orange.data.io import FileFormat
class ImgFormat(FileFormat):
@staticmethod
def _get_buffer(size, filenam... | _export |
<|file_name|>io.py<|end_file_name|><|fim▁begin|>from PyQt4 import QtGui, QtCore, QtSvg
from PyQt4.QtCore import QMimeData
from PyQt4.QtGui import QGraphicsScene, QGraphicsView, QWidget, QApplication
from Orange.data.io import FileFormat
class ImgFormat(FileFormat):
@staticmethod
def _get_buffer(size, filenam... | write_image |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.