## About Me
- 09年底至今,主要工作内容:基于Django的Web开发,从0.96版本到1.7,向Django及相关社区贡献了50+ commits
- 期间涉猎了javascript, golang, clojure等开发语言,对nginx, tornado, nodejs等工具的异步模型有一定了解
- 熟悉Linux下开发,了解部署,但之前未接触过Django的服务部署调优
#!/bin/bash | |
if [[ $EUID -ne 0 ]]; then | |
echo -e " | |
ROOT PRIVILEDGES NEEDED! | |
You have to run this script as root. | |
Aborting... | |
" | |
exit 1 | |
else |
# List unique values in a DataFrame column | |
pd.unique(df.column_name.ravel()) | |
# Convert Series datatype to numeric, getting rid of any non-numeric values | |
df['col'] = df['col'].astype(str).convert_objects(convert_numeric=True) | |
# Grab DataFrame rows where column has certain values | |
valuelist = ['value1', 'value2', 'value3'] | |
df = df[df.column.isin(valuelist)] |
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) |
curl -L https://www.atom.io/api/updates/download -A "Atom/0.1 CFNetwork/1.5" > Atom.zip | |
unzip Atom.zip | |
mv Atom.app /Applications/ |