I hereby claim:
- I am achavez on github.
- I am achavez (https://keybase.io/achavez) on keybase.
- I have a public key whose fingerprint is A204 9AB3 2FFD A454 14B0 3200 0329 8791 5060 3499
To claim this, I am signing this object:
| var url = // Webhook URL | |
| var text = // Text to post | |
| $.ajax({ | |
| data: 'payload=' + JSON.stringify({ | |
| "text": text | |
| }), | |
| dataType: 'json', | |
| processData: false, | |
| type: 'POST', | |
| url: url |
| from bs4 import BeautifulSoup | |
| import requests, csv | |
| # Settings | |
| base_url = 'http://www.schiefferschool.tcu.edu/' | |
| story_list_url = 'more_headlines.asp' | |
| blacklist = ['931.htm', '1021.asp'] | |
| # Get a list of articles to scrape from the More Headlines page | |
| news_page = requests.get(base_url + story_list_url) |
| import os | |
| def list_files(source, extension): | |
| matches = [] | |
| for root, dirnames, filenames in os.walk(source): | |
| for filename in filenames: | |
| if filename.endswith((extension)): | |
| print filename | |
| # Ex: Get all files in the directory docs with the extension PDF |
| import csv, sys | |
| # This is a quick and dirty solution to walk the file that Travis County distributes | |
| # the day after the election and create a new .csv file that has one row per race | |
| # per precinct with the winner and his/her/its vote percentage | |
| # | |
| # CLI usage: python travis-elex-formatter.py input_file.csv output_file.csv | |
| last_field = None | |
| winner_total_votes = 0 |
| #!/bin/bash | |
| ########################################### | |
| # Download full year files and unzip them # | |
| ########################################### | |
| year_files=( | |
| "2009" | |
| "2010" | |
| "2011" |
I hereby claim:
To claim this, I am signing this object:
| #!/usr/bin/env bash | |
| which xlsx2csv || pip install xlsx2csv | |
| for file in *.xlsx | |
| do | |
| echo "Converting $file" | |
| xlsx2csv --ignoreempty --date="%Y-%m-%d" "$file" "$file.csv" | |
| done |
pip install requestsINTERVALmkdir mapspython main.pybrew tap homebrew/cask-fonts, brew tap homebrew/cask-versions)brew install zshwhich zsh to /etc/shells and 2) changing the default shell with chsh -s $(which zsh)brew install zsh-autosuggestions (be sure to follow the instructions output by brew to update your ~/.zshrc)npm install -g spaceship-prompt| import inspect | |
| import datetime | |
| class ClassToLog(object): | |
| pass | |
| def logging_decorator(fn, fn_name): | |
| def logging_method(*args, **kwargs): |