The JSON data seems to emulate lists with dictionaries. It's not clear why we did it that way. Some of the data files actually use keys but others just have strings keys that are numbers "1" .. "n", perhaps it was just done this way to keep them all the same format.
The JSON data seems to emulate lists with dictionaries. It's not clear why we did it that way. Some of the data files actually use keys but others just have strings keys that are numbers `"1" .. "n"`, perhaps it was just done this way to keep them all the same format.
For the uniques I have since figured out the reason. Unique items are indexed by their unique id, which is a sparse set of integers. Since json can only index in objects by strings this format makes sense. Haven't verified the others, but I assume the reason is similar.
>>> with open('d2warehouse/data/uniques.json') as f: uniques = json.load(f)
...
>>> [i for i in range(407) if f"{i}" not in uniques]
[200, 247, 267, 278, 295, 303, 305, 318, 339, 346, 352, 362, 372, 377]
>>>
For the uniques I have since figured out the reason. Unique items are indexed by their unique id, which is a sparse set of integers. Since json can only index in objects by strings this format makes sense. Haven't verified the others, but I assume the reason is similar.
```
>>> with open('d2warehouse/data/uniques.json') as f: uniques = json.load(f)
...
>>> [i for i in range(407) if f"{i}" not in uniques]
[200, 247, 267, 278, 295, 303, 305, 318, 339, 346, 352, 362, 372, 377]
>>>
```
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
The JSON data seems to emulate lists with dictionaries. It's not clear why we did it that way. Some of the data files actually use keys but others just have strings keys that are numbers
"1" .. "n", perhaps it was just done this way to keep them all the same format.For the uniques I have since figured out the reason. Unique items are indexed by their unique id, which is a sparse set of integers. Since json can only index in objects by strings this format makes sense. Haven't verified the others, but I assume the reason is similar.