969cbff0ee308f153b41c5df137b4215907857e3,lib/streamlit/hashing.py,CodeHasher,_to_bytes,#CodeHasher#Any#Any#,295

Before Change


                // Hash the name of the container so that ["a"] hashes differently from ("a",)
                // Otherwise we"d only be hashing the data and the hashes would be the same.
                self._update(h, type(obj).__name__.encode() + b":")
                for e in obj:
                    self._update(h, e, context)
                return h.digest()
            elif isinstance(obj, dict):
                h = hashlib.new(self.name)

After Change


        except (UnhashableType, UserHashError, InternalHashError):
            raise
        except Exception as e:
            msg = _hashing_internal_error_message(e, type(obj))
            raise InternalHashError(msg).with_traceback(e.__traceback__)

    def _code_to_bytes(self, code, context):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: streamlit/streamlit
Commit Name: 969cbff0ee308f153b41c5df137b4215907857e3
Time: 2020-02-11
Author: rhone.j@gmail.com
File Name: lib/streamlit/hashing.py
Class Name: CodeHasher
Method Name: _to_bytes


Project Name: williamFalcon/pytorch-lightning
Commit Name: 9f12ca095ab6e3295bd03fd1e50130a12b11569c
Time: 2021-02-11
Author: carlossmocholi@gmail.com
File Name: pytorch_lightning/trainer/connectors/logger_connector/epoch_result_store.py
Class Name: HookResultStore
Method Name: auto_reduce_results_on_epoch_end


Project Name: NervanaSystems/coach
Commit Name: 5fadb9c18e3de16cc5633175199f9e9e2c381102
Time: 2018-11-07
Author: sina.beh@gmail.com
File Name: rl_coach/architectures/network_wrapper.py
Class Name: NetworkWrapper
Method Name: parallel_prediction