24d3656c6c4b3c6806954487720d53af775a1150,set_expansion_demo/ui/main.py,,get_expand_results_callback,#,169
Before Change
seed_check_label.text = "the words: <span class="bad-word">" + bad_words[:-1] + "</span> are not in the vocabulary. "
print("setting table area")
table_area.children = [seed_check_label,table_layout]
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
try:
// Connect to server and send data
sock.connect(("localhost", 1111))
sock.sendall(bytes(seed + "\n", "utf-8"))
// Receive data from the server and shut down
// length = sock.recv()
received = pickle.loads(sock.recv(2000000))
After Change
if seed == "":
expand_table_source.data={"res":[],"score":[]}
return
if all_phrases is not None:
seed_words = [x.strip() for x in seed.split(",")]
bad_words = ""
for w in seed_words:
if w not in all_phrases:
bad_words += ("""+ w + "",")
if bad_words != "":
seed_check_label.text = "the words: <span class="bad-word">" + bad_words[:-1] + "</span> are not in the vocabulary. "
print("setting table area")
table_area.children = [seed_check_label,table_layout]
print("sending expand request to server")
received = send_request_to_server(seed)
res = [x[0] for x in received]
scores = [y[1] for y in received]
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 8
Instances Project Name: NervanaSystems/nlp-architect
Commit Name: 24d3656c6c4b3c6806954487720d53af775a1150
Time: 2018-06-07
Author: shira.guskin@intel.com
File Name: set_expansion_demo/ui/main.py
Class Name:
Method Name: get_expand_results_callback
Project Name: NervanaSystems/nlp-architect
Commit Name: 24d3656c6c4b3c6806954487720d53af775a1150
Time: 2018-06-07
Author: shira.guskin@intel.com
File Name: set_expansion_demo/ui/main.py
Class Name:
Method Name: get_phrases
Project Name: streamlit/streamlit
Commit Name: 01bf5dd323bebd66b7ad60fdaee34eb8f7b76aae
Time: 2018-08-09
Author: armando@playground.global
File Name: lib/streamlit/proxy/Proxy.py
Class Name:
Method Name: _print_remote_url
Project Name: streamlit/streamlit
Commit Name: 883644354ca6c016a9b79d67e0494db88a823c23
Time: 2018-08-14
Author: armando@playground.global
File Name: lib/streamlit/proxy/Proxy.py
Class Name:
Method Name: _print_remote_url
Project Name: NervanaSystems/nlp-architect
Commit Name: 24d3656c6c4b3c6806954487720d53af775a1150
Time: 2018-06-07
Author: shira.guskin@intel.com
File Name: set_expansion_demo/ui/main.py
Class Name:
Method Name: get_expand_results_callback