Skip to content

Instantly share code, notes, and snippets.

View BUPTGuo's full-sized avatar
🏃‍♂️
Focusing

BUPTGuo BUPTGuo

🏃‍♂️
Focusing
View GitHub Profile
@BUPTGuo
BUPTGuo / ramdisk.sh
Created September 24, 2016 09:02 — forked from rxin/ramdisk.sh
ramdisk create/delete on Mac OS X.
#!/bin/bash
# From http://tech.serbinn.net/2010/shell-script-to-create-ramdisk-on-mac-os-x/
#
ARGS=2
E_BADARGS=99
if [ $# -ne $ARGS ] # correct number of arguments to the script;
then

<<Hive编程指南>>读书笔记

1. 设置hive以本地模式运行(即使当前用户是在分布式模式或伪分布式模式下执行也使用这种模式)

set hive.exec.model.local.auto=true;

若想默认使用这个配置,可以将这个命令添加到$HOME/.hiverc文件中

@BUPTGuo
BUPTGuo / tree.md
Created March 8, 2016 14:41 — forked from jiacai2050/tree.md
one-line tree in python

One-line Tree in Python

Using Python's built-in defaultdict we can easily define a tree data structure:

def tree(): return defaultdict(tree)

That's it!

@BUPTGuo
BUPTGuo / SimpleHTTPServerWithUpload.py
Created November 7, 2015 08:42
SimpleHTTPServer with upload file support, some bug fixed with Python2.7.10
#!/usr/bin/env python
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
"""