Below is input File format(*.txt):
| userID | month | date | hour | totalTW | totalQs | result |
|---|---|---|---|---|---|---|
| 21535110 | 05 | 01 | 02 | 3 | 2 | 1 |
| 21535110 | 05 | 01 | 03 | 3 | 2 | 1 |
| 21535110 | 05 | 01 | 06 | 1 | 0 | 0 |
| 21535110 | 05 | 02 | 02 | 1 | 0 | 0 |
| gid:skpFHMqbdVWSvGpDRXq7dG |
| #!/bin/sh | |
| set -eo pipefail | |
| IFS=$'\n\t' | |
| # Constants | |
| NOW=$(date +%s) | |
| BUILD_FILE_NAME="MyApp-${NOW}" | |
| SCHEME="MyApp" | |
| WORKSPACE="MyApp" | |
| PROJECT="MyApp" |
| # -*- coding: utf-8 -*- | |
| import os | |
| import re | |
| import urllib | |
| from bs4 import BeautifulSoup as Soup | |
| URL_REG = re.compile(r'(https://[^/\\]+)', re.I) | |
| IMG_REG = re.compile(r'<img[^>]*?src=([\'"])([^\1]*?)\1', re.I) |
| #!/bin/sh | |
| setup_brew () { | |
| if ![-f "/usr/local/bin/brew"]; then | |
| /usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)" | |
| fi | |
| } | |
| setup_ipython () { | |
| brew install readline |
| import os | |
| def split(filehandler, delimiter=',', row_limit=10000, | |
| output_name_template='output_%s.csv', output_path='.', keep_headers=True): | |
| """ | |
| Splits a CSV file into multiple pieces. | |
| A quick bastardization of the Python CSV library. | |
| Arguments: |