This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pixelToPoint = function(point, zoom, center, bounds) { | |
// 像素到坐标 | |
if (!point) { | |
return | |
} | |
var zoomUnits = getZoomUnits(zoom); | |
var mercatorLng = center.lng + zoomUnits * (point.x - bounds.width / 2); | |
var mercatorLat = center.lat - zoomUnits * (point.y - bounds.height / 2); | |
var mercatorLngLat = {lng: mercatorLng, lat: mercatorLat}; | |
return mercatorToLngLat(mercatorLngLat) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"strconv" | |
"unsafe" | |
) | |
const ( | |
typeInt = iota |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using std; | |
using assert; | |
func main = ()=> int { | |
list<int> l = [0, 1, 2, 3, 4, 5]; | |
dict<char*, int> d = { | |
"one": 1, | |
"two": 2, | |
"tree": 3, | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"net/http" | |
"net/http/pprof" | |
"github.com/aisk/vox" | |
) | |
func main() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
04db446f5fe1dfd66b4f17e2063484ed4b33e22c3a71c49dc667143e8d26766dfdee8531eef317599b56e5ff48a584b6d2dfdd7887fb3c2980b18b3206aa2f1c91 feisuzhu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import dis, marshal, struct, sys, time, types | |
def show_file(fname): | |
f = open(fname, "rb") | |
magic = f.read(4) | |
moddate = f.read(4) | |
modtime = time.asctime(time.localtime(struct.unpack('L', moddate)[0])) | |
print "magic %s" % (magic.encode('hex')) | |
print "moddate %s (%s)" % (moddate.encode('hex'), modtime) | |
code = marshal.load(f) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern crate bytes; | |
extern crate futures; | |
extern crate tokio_io; | |
extern crate tokio_proto; | |
extern crate tokio_service; | |
use std::io; | |
use std::str; | |
use bytes::BytesMut; | |
use futures::{future, Future}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"time" | |
"github.com/aisk/vox" | |
) | |
func timeit(ctx *vox.Context, next func()) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import time | |
import asyncio | |
import websockets | |
from datetime import datetime | |
last_connect_time = datetime.now() | |
@asyncio.coroutine |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python2.7 | |
import os | |
import subprocess | |
import sys | |
import tempfile | |
def is_skipped_folder(cpython_repo, path): | |
skipped_folders = [ |
NewerOlder