81460887a6dc118719168c98a0d7543b758d2040,tiny_notebook/protobuf/__init__.py,,,#,12

Before Change


import re, sys

// Filter through the classes to find those in CamelCase
camel_case_name = re.compile("([A-Z][a-z0-9]*)+")
module = sys.modules[__name__]
for name in filter(camel_case_name.match, dir(notebook_pb2)):
    setattr(module, name, getattr(notebook_pb2, name))

After Change



// Append the current path to the paths to get imports working properly.
dir_path = os.path.dirname(os.path.realpath(__file__))
sys.path.append(dir_path)

from Chart_pb2 import Chart
from Div_pb2 import Div
from Element_pb2 import Element
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: streamlit/streamlit
Commit Name: 81460887a6dc118719168c98a0d7543b758d2040
Time: 2018-01-17
Author: adrien.g.treuille@gmail.com
File Name: tiny_notebook/protobuf/__init__.py
Class Name:
Method Name:


Project Name: streamlit/streamlit
Commit Name: 89ff0a812370c9bdc22b1d2297c09806f0d1375f
Time: 2019-11-19
Author: pnaomi@gmail.com
File Name: lib/streamlit/__init__.py
Class Name:
Method Name:


Project Name: estnltk/estnltk
Commit Name: 74b2ba903ecf195c2f6abf1432b8fa7240be0f08
Time: 2015-07-23
Author: amatsin@gmail.com
File Name: estnltk/wiki/infoBox.py
Class Name:
Method Name: infoBoxParser


Project Name: testerSunshine/12306
Commit Name: 2df57447d3a809d9458c172529daa4f0c9d39296
Time: 2019-01-06
Author: 931128603@qq.com
File Name: agency/cdn_utils.py
Class Name: CDNProxy
Method Name: open_cdn_file