Skip to content

Instantly share code, notes, and snippets.

View Flowerowl's full-sized avatar
💭
coding

Flowerowl Flowerowl

💭
coding
View GitHub Profile
@Flowerowl
Flowerowl / uninstall_office_2016.sh
Created May 3, 2018 08:39 — forked from pirafrank/uninstall_office_2016.sh
Uninstall Office 2016 from OS X completely
#!/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)]
@Flowerowl
Flowerowl / gist:36b67818a54fe6f6342013f890fbaa6b
Created September 13, 2016 08:23 — forked from aisk/gist:3735854
百度地图坐标与像素互相转换的方法
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)

Django服务部署

## About Me

  • 09年底至今,主要工作内容:基于Django的Web开发,从0.96版本到1.7,向Django及相关社区贡献了50+ commits
  • 期间涉猎了javascript, golang, clojure等开发语言,对nginx, tornado, nodejs等工具的异步模型有一定了解
  • 熟悉Linux下开发,了解部署,但之前未接触过Django的服务部署调优
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/