Skip to content

Instantly share code, notes, and snippets.

View lepture's full-sized avatar
💭
I'm working on Typlog.com now

Hsiaoming Yang lepture

💭
I'm working on Typlog.com now
View GitHub Profile

Most downloaded projects

SELECT
  file.project,
  COUNT(*) as total_downloads,
FROM
  TABLE_DATE_RANGE(
    [the-psf:pypi.downloads],
    TIMESTAMP("20160114"),
from sre_parse import Pattern, SubPattern, parse as sre_parse
from sre_compile import compile as sre_compile
from sre_constants import BRANCH, SUBPATTERN
class Scanner(object):
def __init__(self, tokens, flags=0):
subpatterns = []
pat = Pattern()
@killercup
killercup / Readme.md
Last active August 26, 2023 23:14
Convert The Rust Programming Language to Epub
@staltz
staltz / introrx.md
Last active May 7, 2024 09:38
The introduction to Reactive Programming you've been missing
@matthew-brett
matthew-brett / rename_wheels.py
Created May 20, 2014 04:19
Script to rename wheel files built with MacPython, to express compatibility with 10.9 system python and homebrew.
#!/usr/bin/env python
""" Rename MacPython wheels for system python and homebrew """
from __future__ import print_function
import os
from os.path import expanduser, splitext
import sys
from wheel.install import WheelFile
POP_PLAT_TAG = 'macosx_10_6_intel'
<!DOCTYPE html>
<html class='no-js' lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'>
<head>
<meta charset='UTF-8' />
<title>Messages</title>
<meta content='initial-scale=1, width=device-width' name='viewport' />
<style type='text/css'>
*, *:before, *:after {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
@ikbear
ikbear / uptoken.md
Created February 10, 2014 08:58
UpToken

uptoken

uptoken 是由PutPolicy经过编码加密得到的,语义如下

PutPolicy

字段 类型 语义
scope string 指定为bucket:key这样的形式,bucket必须
deadline int token失效的unix时间戳(单位:秒),必须
- (void)testTwitter
{
// Step 0: Check that the user has local Twitter accounts
BOOL isTwitterAvailable = [SLComposeViewController isAvailableForServiceType:SLServiceTypeTwitter];
NSLog(@"isTwitterAvailable:%d", isTwitterAvailable);
if (isTwitterAvailable) {
// Step 1: Obtain access to the user's Twitter accounts
ACAccountStore *accountStore = [[ACAccountStore alloc] init];
@bomberstudios
bomberstudios / sketch-plugins.md
Last active February 26, 2024 07:02
A list of Sketch plugins hosted at GitHub, in no particular order.
@shunfan
shunfan / slugify.py
Last active June 25, 2017 20:18
Slugify Chinese
# coding=utf-8
"""
Slugify for Chinese
没有优化多音字
优化多音字的项目有:
https://github.com/jiedan/chinese_pinyin
"""
import re
import unidecode