I hereby claim:
- I am colorstain on github.
- I am colorstain (https://keybase.io/colorstain) on keybase.
- I have a public key whose fingerprint is 757A F248 BBD0 A7CD 1F7E ACF1 9461 7797 FB66 89A4
To claim this, I am signing this object:
__author__ = 'colorstain@gmail.com' | |
import email | |
from datetime import datetime, timedelta | |
from imapclient import IMAPClient | |
from bs4 import BeautifulSoup #make sure it's the latest version | |
import csv | |
def parse_chats(xml): | |
soup = BeautifulSoup(xml, features='xml') |
from functools import wraps | |
from django.db import transaction | |
def autocommit_off(func): | |
""" | |
Decorator to turn autocommit off inside a function, function should commit or rollback before returning. | |
:param func: Function to be decorated | |
:return: decorated function | |
""" |
# Import appropriate modules from the client library. | |
from googleads import dfp | |
# Set the line item ID and creative IDs to associate. | |
LINE_ITEM_ID = 'INSERT_LINE_ITEM_ID_HERE' | |
CREATIVE_IDS = ['INSERT_CREATIVE_IDS_HERE'] | |
def main(client, line_item_id, creative_ids): | |
# Initialize appropriate service. |
I hereby claim:
To claim this, I am signing this object:
def table(rows, add_index=False): | |
""" | |
Generates a table from a list of lists. The first row should contain the | |
headers. | |
""" | |
rows = [list(row) for row in rows] | |
headers = rows[0] | |
body = rows[1:] | |
if add_index: | |
headers.insert(0, '#') |
--- | |
- name: Copy SSH key | |
hosts: all | |
serial: "{{ serial|default(1) }}" | |
tasks: | |
- name: Get the name of the user running the script | |
local_action: command whoami | |
register: username_on_host | |
- name: Copy ssh key to server |