Skip to content

Instantly share code, notes, and snippets.

@zxygentoo
zxygentoo / url.md
Last active July 7, 2022 09:51
Url Parameters Semantic Definition Draftt

pixel eg.

https://app.thespace.game/@123,456

playback eg.

https://app.thespace.game/#playback/2X/16Z/123,456/12345/30000/QmdTzRdbGeEnWW2yS8kHiwF5YFUfbU4FXqDEhTAtVVtdUq
@zxygentoo
zxygentoo / snapper.md
Last active March 7, 2022 06:07
Snapper Design Proposal (Draft)

snapper design proposal (draft)

purpose

  • provide efficient map and color change history access for the space clients.

design goals/considerations

  • reliable
  • no read bottleneck for clients
@zxygentoo
zxygentoo / chinese_word_freq.py
Last active April 8, 2022 12:20
使用 jieba 分词库的简单中文词频统计
#! python3
# -*- coding: utf-8 -*-
from collections import Counter
import sys
import os
import codecs
import getopt
import jieba
@zxygentoo
zxygentoo / sync_dir_to_aliyun_oss.py
Created June 15, 2017 13:24
This script sync all files of a given dir to a given aliyun oss bucket and keep all the sub-dir as part of the keys.
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
This script sync all files of a given dir to a given aliyun oss bucket
and keep all the sub-dir as part of the keys.
"""
from __future__ import print_function
from os import path, walk
@zxygentoo
zxygentoo / ex.machina.py
Last active December 26, 2015 14:14
ex.machina.py
#BlueBook code decryption
import sys
def sieve(n):
x = [1] * n
x[1] = 0
for i in range(2,n/2):
j = 2 * i
while j < n:
x[j]=0