Skip to content

Instantly share code, notes, and snippets.

View HinnyTsang's full-sized avatar
🌏
Working from the Earth

Hinny Tsang HinnyTsang

🌏
Working from the Earth
View GitHub Profile
@HinnyTsang
HinnyTsang / read_scorpio_example.py
Last active January 30, 2024 18:38
Read scorpio output sample
import h5py
def read_scorpio_out(file_name) -> dict[str, np.ndarray]:
"""
# Read scorpio output
Example function to read scorpio output.
The output is a dictionary with keys as the variable names and values as the corresponding values.
@HinnyTsang
HinnyTsang / simon_hash_map.py
Created September 26, 2023 17:42
simon_hash_map
from __future__ import annotations
from typing import List, MutableMapping
class NewHash:
_constant_to_key = 0
_constant_to_value = 0
_map: MutableMapping[int, int] = dict()
def __init__(self):